If all you want to test is coroutines, rather than the message passing
aspects of concurrency, you can use libs/coroutines:

"libs/coroutines" require
USE: coroutines
: gen ( -- co ) [ 100000 [ over coyield 2drop ] each f swap coyield ] cocreate ;
: run ( co -- ) f swap coresume [ run ] [ drop ] if ;

[ gen run ] time

This is the equivalent of the Python sample you posted. Unfortunately
continuations don't compile so the test runs interpreted.

Chris.
-- 
http://www.bluishcoder.co.nz

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to