Most solutions here use lanes.gen("*",{globals = _G},func)
. When I run it, I get can't copy non-deep full userdata across lanes
. Maybe this is because of io.stderr, io.stdout, io.stdin
which are file
type or lanes.core.cancel_error
which is userdata
type or lanes.core timer_gateway
. How to use {globals = _G} or workaround? Is it a bug?
Asked
Active
Viewed 80 times
0

vvkatwss vvkatwss
- 3,345
- 1
- 21
- 24
-
1Why do you need to copy the whole globals table across lanes? – Egor Skriptunoff Nov 26 '21 at 17:47
-
This relates to my question about calling c function. I thought that lanes would transfer global c function to new thread. I am learning lua-lanes. Using _G is easy for testing. – vvkatwss vvkatwss Nov 29 '21 at 16:08