Message from JavaScript discussions

January 2019

— It's like:
You can not own a gun
Vs:
It might be unsafe to own a gun

— 

Https://en.wikipedia.org/wiki/Protothread

Within a protothread, yielding is accomplished by utilizing Duff's device within a thread's function and an external variable used in within the switch statement. This allows jumping (resuming) from a yield upon another function call.

— This is basically how V8 runs GeneratorFunctions

— The description matches it very closely

— Tom Duff made a statement which is in there, but I solved that problem :)

— 

 it’s not possible using this method to have coroutines give up control anywhere but in their top-level routine

Message permanent page

— Hz protothreads can give up control from any level because all levels are the top level

— Thanks Dani :)

— 😄👍

— I have been reading it

— I think we shoud try an example with metacall

— There is no thread safety but