CC: Tweaked

CC: Tweaked

42M Downloads

`os.queueEvent` won't pass function or thread object

zyxkad opened this issue ยท 2 comments

commented

Minecraft Version

1.19.x

Version

1.101.2

Details

function fn()
  -- do something
end
os.queueEvent('start_thread', fn)

-- ...

local _, fn = os.pullEvent('start_thread')
print(fn) -- nil here
local thr = coroutine.create(fn)
commented

I guess probably queueEvent only pass serialisable things? then it should be a doc issue

commented

I look around again, don't really understand why file_transfer event can receive the function with table