aboutsummaryrefslogtreecommitdiffstats
path: root/src/event/Loop.hxx (follow)
Commit message (Collapse)AuthorAgeFilesLines
* copyright year 2014Max Kellermann2014-01-131-1/+1
|
* event/Loop: allow scheduling events before Run()Max Kellermann2014-01-091-0/+15
| | | | | Add the debug-only flag "virgin" which gets checked by assert() calls. Fixes assertion failures when using zeroconf/avahi.
* event/Loop: try to avoid the WakeFD when adding DeferredMonitorMax Kellermann2014-01-051-0/+8
| | | | | | | | | Add a flag that indicates whether the EventLoop is currently "busy". As long as that flag is set, it does not need to be woken up - we can simply add the DeferredMonitor to the list, and it will be caught by EventLoop very soon. This eliminates nearly all of the DeferredMonitor overhead when compared to IdleMonitor, rendering IdleMonitor mostly obsolete.
* event/Loop: add attribute "again"Max Kellermann2014-01-051-0/+6
| | | | Improved support for added events.
* event/Loop: add thread-safety assertionsMax Kellermann2014-01-051-0/+13
|
* event/Loop: move code to HandleDeferred()Max Kellermann2014-01-051-0/+7
|
* event/Loop: remove the GLib implementationMax Kellermann2014-01-041-61/+1
| | | | | Now that the remaining known bugs in poll() implementation are fixed, we can go on without the GLib implementation.
* event/Loop: remove unused method AddCall()Max Kellermann2014-01-041-9/+0
|
* event/DeferredMonitor: make fully thread-safeMax Kellermann2014-01-041-0/+17
| | | | | | | | | | | | | 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().
* event/Loop: document that AddCall() is thread-safeMax Kellermann2013-12-311-0/+5
|
* event: introduce generic API for internal event loopDenis Krjuchkov2013-11-281-18/+6
|
* Add infrastructure for using multiple event loopsDenis Krjuchkov2013-11-271-9/+24
| | | | | | | | | | | | This change adds two configuration options: --with-eventloop=[glib|internal|auto] --with-pollmethod=[epoll|auto] First allows switching between GLib event loop and internal one. Second chooses backend to use for internal event loop. Conditional compilation symbols are changed accordingly. Additional helper macro MPD_OPTIONAL_FUNC_NODEF is added as well.
* event: add API documentationMax Kellermann2013-11-241-0/+21
|
* event/SocketMonitor: add method Abandon()Max Kellermann2013-11-061-0/+7
|
* gcc.h: rename to Compiler.hMax Kellermann2013-10-151-1/+1
|
* EventLoop: new implementation using epollMax Kellermann2013-08-101-11/+112
| | | | Implement an event loop without GLib.
* thread/Id: new class replacing GThread pointersMax Kellermann2013-08-101-5/+6
| | | | Remove a GLib dependencies from class EventLoop and DatabaseLock.
* EventLoop: add methodd IsInside()Max Kellermann2013-08-081-2/+21
| | | | | Track which thread runs the EventLoop and provide a check whether we're currently inside.
* EventLoop: un-inline Run() and othersMax Kellermann2013-08-081-22/+4
| | | | Prepare for adding more code.
* event/Loop: add method WakeUp()Max Kellermann2013-01-301-0/+4
|
* event/TimeoutMonitor: wrapper for g_timeout_source_new()Max Kellermann2013-01-141-10/+8
|
* Main, IOThread: move GMainLoop setup code to class EventLoopMax Kellermann2013-01-141-0/+86