next up previous contents
Next: Property: delayWaitfor Up: Message Properties Previous: Property: delay

Property: waitfor

The waitfor property is used to wait for the reception of a token before sending a message. The property can add variable continuation restrictions dynamically, enabling a flexible and-barrier for concurrent execution. The following example shows that the message compare(b) can be delivered to Actor a if Actors a and b have migrated to the same theater:
 
token x = a<-migrate("rmsp://europa.cs.rpi.edu:4040");
token y = b<-migrate("rmsp://europa.cs.rpi.edu:4040");
a<-compare(b) : waitfor(x,y); 
 
   


Wei-Jen Wang
2007-11-28