Use of FIFOs

From reSIProcate
Jump to: navigation, search

FIFOs (first int, first out), also known as queues, are a standard thread synchronization/buffering mechanism.

FIFOs are the main way to move information between threads within reSIProcate. Since SIP is a message/event protocol, event FIFOs are a natural and error resistant mechanism for communicating among threads.

There a few appearances of direct use of mutex; they should be viewed with suspicion and added to reluctantly. For example, the logger (appropriately) protects an external resource, std::cerr with a Mutex.