coroutines for newLISP

Started by frontera000, August 28, 2006, 05:49:40 PM

Previous topic - Next topic

pjot

#15
For me, the magic word in coroutines is 'reentrant'... :-)



Threads and forked processes are not reentrant. That is why the semaphores are needed in my small piece of code. (With threads you can stop execution waiting for mutexes to unlock, but it is not exactly the same.)



Also I found Simon Tatham's dirty trick extremely enlightening:



http://www.chiark.greenend.org.uk/~sgtatham/coroutine.h">http://www.chiark.greenend.org.uk/~sgtatham/coroutine.h





Peter

_ex_

#16
I demand coroutines in Win!! :))

Cool stuff frontera000.