The relationship between producers message bus threads, consumer thread and the main thread

1, the main thread when the corresponding message to be sent to the message bus, is sent to the producer thread synchronous blocking object queue, then the producer thread synchronization condition signal is received, the data acquired from the queue immediately, and after assembly the message will be sent to the bus, and then wait for the next message.

2, consumer thread, when a message, the message is performed by monitoring the bus by the corresponding callback function process message queue, the main thread is sent to the queue after the assembly of the structure to the corresponding message, and then read by notify the main thread pipeline processing queue the new message.

Guess you like

Origin www.cnblogs.com/share-ideas/p/11221781.html