Skip to content

Instantly share code, notes, and snippets.

@cablehead
Created December 8, 2017 00:07
Show Gist options
  • Save cablehead/1daf5a4239b25f1d29c398c2cd3f0a65 to your computer and use it in GitHub Desktop.
Save cablehead/1daf5a4239b25f1d29c398c2cd3f0a65 to your computer and use it in GitHub Desktop.
local levee = require("levee")
local _ = levee._
local h = levee.Hub()
local r, w = h.io:pipe()
h:spawn(function()
for i = 1, 1000 do
local s = tostring(i):rep(i)
w:write(s)
end
w:close()
end)
local buf = levee.d.Buffer(4096)
while true do
local err = r:readinto(buf)
if err then break end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment