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.
Loading
Please sign in to comment