 C: <process> process
 
 GENERIC: send ( message process -- )
-
-: random-pid ( -- id ) 8 big-random ;
 
 <PRIVATE
 : make-process ( -- process )

    #! similar to a thread but can send and receive messages to and
    #! from other processes. It may also be linked to other processes so
    #! that it receives a message if that process terminates.
    [ ] random-pid make-mailbox <process> ;

: make-linked-process ( process -- process )
    #! Return a process set to run on the local node. That process is
    #! linked to the process on the stack. It will receive a message if
    #! that process terminates.
    1quotation random-pid make-mailbox <process> ;
PRIVATE>

: self ( -- process )

PRIVATE>
: mailbox-get* ( mailbox timeout -- obj )
    (mailbox-block-if-empty)
    mailbox-data pop-front ;

: mailbox-get ( mailbox -- obj )
    f mailbox-get* ;
