Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Remove timeout from reads of IPC commands
Each process executes IPC commands and tick commands. In the previous implementation, IPC commands were read in with a timeout in order to control the tick rate. But any read with a timeout can result in a partial read of data. And this led to the potential for an IPC command to get lost, which could lead to crashes, e.g. if an important state change was not communicated. In the new implementation, read with "-t 0" is called to test for the existence of any new IPC commands, and whilst data exits, any new IPC commands are read in. Once all the oustanding IPC commands have been read in or if a state change command is read in, the tick commands are executed and a call to sleep is issued to sleep until the next tick.
- Loading branch information