Changeset 3cad97060519ce6609a7c40c09939ca0941ed63a

User picture

Commiter: Charles Childers

Author: Charles Childers

Parent: dd551d7192

(2010/03/12 23:48) Almost 2 years ago

update concurrency library

Affected files

Updated library/experimental/concurrency.retro Download diff

dd551d71920779212829c7c781ca8c4d654d89353cad97060519ce6609a7c40c09939ca0941ed63a
1
: :go   ( a-  ) 1 13 out wait ;      ( start new core with ip set to a )
1
: :go     (  a-  ) 1 13 out wait ;         ( start new core with ip set to a )
2
: go    ( "-  ) ' :go ;              ( parse next word and run it on a new core )
2
: go      (  "-  ) ' 0; :go ;              ( parse a word and run it on a new core )
3
: ->c   ( xy- ) 2 out wait ;         ( send x to channel y )
3
: ->c     ( xy-  ) 2 out wait ;            ( send x to channel y )
4
: c->   ( x-y ) 1 out wait 1 in ;    ( receive y from channel x )
4
: c->     (  x-y ) 1 out wait 1 in ;       ( receive y from channel x )
5
: cores ( -x  ) -7 5 out wait 5 in ; ( number of running cores )
5
: delchan (  x-  ) dup 1 out 2 out wait ;  ( delete channel )