next up previous contents
Next: Actor Garbage Collection Up: Message Properties Previous: Property: waitfor

Property: delayWaitfor

SALSA does not support multiple properties. delayWaitfor is a temporary solution to support delay and waitfor in the same message. The delayWaitfor property takes the first argument as the delay duration in milliseconds, and the remainder as tokens. For instance, the message compare(b) can be delivered to Actor a if Actors a and b have migrated to the same theater and after a delay of 1 second:

 
// The message compare(b) will be delivered to Actor a
//  if Actors a and b has migrated to the target theater
//  and after a delay of 1 second.
token x = a<-migrate("rmsp://europa.cs.rpi.edu:4040");
token y = b<-migrate("rmsp://europa.cs.rpi.edu:4040");
a<-compare(b) : delayWaitfor(new Integer(1000),x,y); 
 
   


Wei-Jen Wang
2007-11-28