You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
signalIfIdle used to update the event mask in libevent to add
a write event to make the socket available. Libevent would then
pick up that socket next time it went down to the OS to do a poll
on the sockets. The problem is that when we try to update the
event mask for a socket libevent will try to acquire the mutex
used by the event base in order to do that. If the code was
called from another worker thread it would hold it's own lock
on the event base (and we're subject for a deadlock).
The new implementation of signalIfIdle push the connection
onto a list of connections to signal for the worker thread,
before it notifies the worker thread by writing to the
notification pipe for the worker thread. The callback for
the worker thread swaps out the list of connections, and
runs the state machine for each of the connections in there.
Change-Id: Ic0ba5de83b8f924a8b7457c65d0e91fbf7927f7d
Reviewed-on: http://review.couchbase.org/105714
Tested-by: Build Bot <[email protected]>
Well-Formed: Build Bot <[email protected]>
Reviewed-by: Jim Walker <[email protected]>
0 commit comments