3.2. sync — Thread synchroniztion

Thread synchronization refers to the idea that multiple threads are to join up or handshake at a certain point, in order to reach an agreement or commit to a certain sequence of action.

Simba documentation: sync

class sync.Event

Initialize given event object.

Simba documentation: sync/event


Wait for an event to occur and return a mask of all active events.


Write given event(s) to the channel.


Get the number of event(s) set in the channel.

class sync.Queue

Initialize given queue object.

Simba documentation: sync/queue


Reads up to size number of bytes from the queue and returns them as a string. Raises an exception on error.


Write given string to the queue. Returns the number of bytes written. Raises an exception on error.


Get the number of bytes available to read.