Skip to content

Instantly share code, notes, and snippets.

@FurryHead
Created May 30, 2011 18:35
Show Gist options
  • Save FurryHead/999272 to your computer and use it in GitHub Desktop.
Save FurryHead/999272 to your computer and use it in GitHub Desktop.
require 'lanes'
function sqr()
print(5*5)
end
function middleman()
sqr()
end
gen = lanes.gen({globals = _G}, middleman)
print(gen()[1])
OUTPUT:
tc@box:~$ lua lanestrouble.lua
lua: lanestrouble.lua:4: attempt to call global 'print' (a nil value)
stack traceback:
[C]: in function 'error'
./lanes.lua:190: in function <./lanes.lua:136>
lanestrouble.lua:13: in main chunk
[C]: ?
threading.c 399: pthread_cond_destroy(ref) failed, 16 EBUSY
Aborted
tc@box:~$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment