Fix waiting on coroutines (#5463)

Public coroutine API returns a safe reference to specific running coroutine. Fixes bug where multiple coroutines executing same procedure would identify as same coroutine.
Greatly optimizes `alive()` (and as a result of that `wait()`) calls.
Coroutine struct is allocated together with stack as memory unmanaged by GC.
This commit is contained in:
Rokas Kupstys 2017-03-02 15:53:50 +02:00 • committed by Andreas Rumpf
commit cd2721242a
3 changed files with 56 additions and 27 deletions

View file

@ -0,0 +1 @@
-d:nimCoroutines