Rendezvous: Difference between revisions

m
Syntax
m (Typos)
m (Syntax)
Line 6:
* Engaging the rendezvous (servicing the entry point).
 
The caller may limit the waiting time to the callee to accept the rendezvous. I.e. a rendezvous request can be aborted if not yet accepted by the callee. When accepted the rendezvous is processed until its completion. During this time the caller and the callee [[task|tasks]] stay synchronoussynchronized. Which context is used to process the rendezvous depends on the implementation which may wish to minimize context switching.
 
The callee [[task]] may accept several rendezvous requests:
 
* Rendezvous to the same entry point from different tasks;
* Rendezvous to different entry pointpoints.
 
The callee accepts one rendezvous at a time.
 
Language mechanism of [[exceptions]] (if any) ishas to be consistent with the rendezvous. In particular when an exception is propagated out of a rendezvous it shall do in both tasks. The exception propagation is synchronous within the rendezvous and asynchronous outside it.
 
AAn engaged rendezvous can be requeued to by the callee to another entry point of its [[task]] or to another [[task]], transparently to the caller.
 
Differently to messagingmessages which are usually asynchronous, rendezvous are synchronous, as it was stated before. Therefore a rendezvous does not require marshaling. Itthe isparameters alsoand a buffer to keep them. Further, rendezvous can be implemented without context switch. This makes rendezvous a more efficient than messaging.
 
Rendezvous can be used to implement monitor synchronization objects. A monitor guards a shared resource. All users of the resource request a rendezvous to the monitor in order to get access to the resource. Access is granted by accepting the rendezvous for the time while the rendezvous is serviced.