You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does that mean that it's impossible to interrupt a long-running coroutine and move it to a different os-level thread?
That should be possible if you call mco_yield somewhere from the coroutine entry function, that is the only way to interrupt it (from inside it). What I meant there is that you should not call minicoro functions from different OS threads simultaneously (you would need to use a mutex for that).
You can migrate a coroutine to another thread to make a scheduler, just make sure the coroutine lifetime is always present at most one thread simultaneously.
Also you should take lot of care like not trying to resume a coroutine that is already running in another thread, the library will not catch such mistake.
Thanks for clarification. As I understand it, we really can not "interrupt" a long-running coroutine from outside and move it to another os-level thread right after interruption.
Hi, I'm new to minicoro and try to understand its capabilities. The readme states:
Does that mean that it's impossible to interrupt a long-running coroutine and move it to a different os-level thread?
The text was updated successfully, but these errors were encountered: