local thread = coroutine.running()
finished and then
Script thread should resume, resolving the
1 after once
Module finishes running
Script thread does not resume after
Issue Area: Engine
Issue Type: Other
Note: This appears to only happen if you work with the coroutine directly. BindableEvents, for example, can yield and resume without issue.
Yes, this issue occurs as well if you do the same for callbacks like RemoteFunctions, BindableFunction, between other things I probably don’t know.
task.spawn should be used for resuming coroutines now. They gotta fix the issue with coroutine.resume though as well as fixing how Instances behave in weak tables.
By the way here is a very old post of mine, the code is different, but it literally does the same: Glitch with RemoteFunctions? - Help and Feedback / Scripting Support - DevForum | Roblox
It does appear that coroutine.resume is the broken component of this interaction
This is probably due to the modulescript code returning while not under the control of the Roblox task scheduler.