Skip to content
Permalink
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
lynxthecat committed May 15, 2023
1 parent ef74641 commit 9a04c73
Showing 1 changed file with 174 additions and 172 deletions.

0 comments on commit 9a04c73

Please sign in to comment.