• Max Kellermann's avatar
    event/DeferredMonitor: make fully thread-safe · a357d84d
    Max Kellermann authored
    Instead of creating a new eventfd for each DeferredMonitor instance,
    reuse EventLoop's eventfd, and add a std::list to EventLoop that
    manages the list of pending DeferredMonitors.  This std::list is
    protected by the same mutex as the "calls" list.
    
    The bottom line is: reduced overhead because the per-instance eventfd
    was eliminated, slightly added overhead due to Mutex usage (but
    negligible), and we're thread-safe now.
    
    This subsystem is now good enough to replace EventLoop::AddCall().
    a357d84d
Name
Last commit
Last update
..
BufferedSocket.cxx Loading commit data...
BufferedSocket.hxx Loading commit data...
Call.cxx Loading commit data...
Call.hxx Loading commit data...
DeferredMonitor.cxx Loading commit data...
DeferredMonitor.hxx Loading commit data...
FullyBufferedSocket.cxx Loading commit data...
FullyBufferedSocket.hxx Loading commit data...
IdleMonitor.cxx Loading commit data...
IdleMonitor.hxx Loading commit data...
Loop.cxx Loading commit data...
Loop.hxx Loading commit data...
MultiSocketMonitor.cxx Loading commit data...
MultiSocketMonitor.hxx Loading commit data...
PollGroup.hxx Loading commit data...
PollGroupEPoll.hxx Loading commit data...
PollGroupPoll.cxx Loading commit data...
PollGroupPoll.hxx Loading commit data...
PollGroupWinSelect.cxx Loading commit data...
PollGroupWinSelect.hxx Loading commit data...
PollResultGeneric.hxx Loading commit data...
ServerSocket.cxx Loading commit data...
ServerSocket.hxx Loading commit data...
SignalMonitor.cxx Loading commit data...
SignalMonitor.hxx Loading commit data...
SocketMonitor.cxx Loading commit data...
SocketMonitor.hxx Loading commit data...
TimeoutMonitor.cxx Loading commit data...
TimeoutMonitor.hxx Loading commit data...
WakeFD.hxx Loading commit data...