Skip to content
Discussion options

You must be logged in to vote

Yes, just catching the event is not enough. You need to actually send the event back to the coroutine again, via coroutine.resume.

coroutine.resume(co, table.unpack(event)) -- passes the event to the coroutine

Again, highly recommend looking at how parallel does it, or just using parallel instead of running your own coroutine library. There's a lot of small issues that can occur when working manually with coroutines.

But I believe you may also be getting stuck on another hiccup of coroutines... Coroutines are not Threads. They do not run in the background. Lua is single-threaded, and so everything runs sequentially. Calling coroutine.resume actually switches to running your coroutine, the…

Replies: 5 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@2f5f3a1b567e0611949455401526cba2
Comment options

@2f5f3a1b567e0611949455401526cba2
Comment options

@fatboychummy
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2446 on May 22, 2026 07:42.