Next: Synchronous variables
Up: Synchrony
Previous: Synchrony
  Contents
Synchronization is quite easy to perform. At the point of the code
that you want to synchronize all processes, call:
-
- int DICE_sync ( void );
When a client calls DICE_sync, it communicates with the server, updating
synchronous variables (see sections 3.2 and 8),
and blocks, waiting for a message. Blocking is done with read(2),
so you may need to take care in threaded programs.
Once all clients call DICE_sync, the server broadcasts
a message, and they all unblock.
2001-12-09