Commit a605a120 authored by Scott Vokes's avatar Scott Vokes
Browse files

Switch listener to same incoming command handling as sender.

Rather than using a thread-safe queue, threads sending messages to
listeners atomically reserve a message struct, write a command into
it, and commit the command by writing the message ID into the listener
thread's incoming command pipe. It polls on network IO and the command
pipe, so commands wake it up. It reads the ID, processes the command
written into l->msgs[ID], and atomically releases the message struct.
parent e0e37e04
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment