internal/task,transform: fix coroutines scheduling order #1237
Conversation
This change applies a loop around resuming a task. This means that a task will not suspend implicitly when returning from a function.
|
While the change itself seems fine, it does increase code size a little bit on WebAssembly. Therefore, I wonder why this is necessary? The Go specification does not define a particular order between goroutines unless explicit synchronization is used. If this is for interrupts, I do not think this is a complete fix. I think interrupts are only really safe when used with the tasks scheduler as it is much easier to reason about ordering and heap allocation (no heap allocation on function calls, for example). The tasks scheduler should be implementable on any reasonable baremetal target. |
| *rawState | ||
|
|
||
| // retcon is set to true when a call returns and awakens it caller. | ||
| retcon bool |
aykevl
Jul 16, 2020
Member
What does retcon mean? "Return continue"?
What does retcon mean? "Return continue"?
|
I guess I will work on the coroutines replacement instead |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

This change applies a loop around resuming a task.
This means that a task will not suspend implicitly when returning from a function.