next up previous contents
Next: Bibliography Up: Message Properties Previous: Property: waitfor   Contents

Property: delayWaitfor

The delayWaitfor property is used to send a message with a given delay and to wait for the reception of a token. It takes the first argument as the delay duration in milliseconds, and the remainder as tokens. For instance, the following message addUser will be sent to the actor, book, after a delay of 1s, and the message can be processed until the target actor has received token email and token ready2go.

 
token email =  book<-email(new String("kaoutar"));
token ready2go = standardInput<-readLine();
book<-addUser(email, new String("kaoutar"))
      :delayWaitfor(new Integer(1000),ready2go); 
 
   

LITERATURE CITED


Wei-Jen Wang 2006-10-14