Commit 1704d925 authored by Scott Vokes's avatar Scott Vokes
Browse files

Restructure sender thread to eliminate race on message buffer free().

Now, the sender has complete control over its own execution. tx_info_t
event structs are atomically reserved / released as part of client
commands. Commands cause the client caller to block until they have
been processed.

Events which represent outgoing requests can cause the relevant FD to be
added to the set of sockets watched for write access, and polling checks
for commands that have been committed and for writeable sockets. Writes
proceed through states (enqueue, write, notify, release) in a tagged
union, and errored events are expired immediately.

All CI tests pass.

There is still some work necessary for cleanup on failed allocations,
and a race condition related to error handling as requests are being
added has been noted.
parent 175aca76
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment