Max Kellermann
3d69f43cff
event/Loop: include SocketEvent.hxx only if HAVE_THREADED_EVENT_LOOP
2023-09-16 22:55:04 +02:00
Max Kellermann
41b1931d91
event/Loop: move the poll_backend to the top
...
This is where all sockets are registered, so it should be initialized
first and destructed last.
2023-09-16 22:45:45 +02:00
Max Kellermann
148aca23be
use SPDX IDs, replacing the long copyright headers
2023-03-06 14:59:48 +01:00
Max Kellermann
02f5698868
event/Loop: remove unnecessary include
...
Not used since a3b32819b1
2023-01-31 13:04:25 +01:00
Max Kellermann
74976d3199
event: make FineTimerEvent optional
...
Several applications don't need it, so let's eliminate the code from
the executable.
2023-01-22 12:21:46 +01:00
Max Kellermann
a3b32819b1
event/Loop: split InjectBreak() from Break()
2022-11-22 22:30:12 +01:00
Max Kellermann
b3c5e6a3cc
event/Loop: use IntrusiveList instead of boost::intrusive::list
2022-11-10 11:57:57 +01:00
Max Kellermann
ac7bf12743
event/Loop: move call to FlushClockCaches()
2022-09-28 10:03:39 +02:00
Max Kellermann
db21e20c99
event/Loop: improve API doc wording
2022-09-28 09:55:35 +02:00
Max Kellermann
520e96b6e8
event/Loop: rename parameter
2022-09-28 09:45:58 +02:00
Max Kellermann
cc0def15c4
Copyright year 2022
2022-07-14 17:59:35 +02:00
Max Kellermann
664674913e
event/Loop: include cleanup
2021-02-22 23:32:39 +01:00
Max Kellermann
5a16e3ffa3
event/TimerWheel: optimized container for CoarseTimerEvent
2021-02-05 18:24:25 +01:00
Max Kellermann
1b4fd74575
event/TimerEvent: rename to FineTimerEvent
...
... and make TimerEvent a type alias for FineTimerEvent (i.e. swap
names).
2021-02-05 18:18:05 +01:00
Max Kellermann
e802f1f61a
event/Loop: move TimerSet to separate class
2021-02-05 18:09:21 +01:00
Max Kellermann
271b287356
event/TimerEvent: assign due
in Schedule()
2021-02-05 17:57:05 +01:00
Max Kellermann
2a30acd99c
event/Loop: use [[gnu::pure]]
2021-02-05 17:55:33 +01:00
Max Kellermann
13f8a912e3
event/Loop: simplify wake_event initializer
2021-01-11 20:14:20 +01:00
Max Kellermann
abbd980671
Merge branch 'v0.22.x'
2021-01-01 19:59:15 +01:00
Max Kellermann
5348f8c9c8
copyright year 2021
2021-01-01 19:54:28 +01:00
Max Kellermann
790e540c19
event/Loop: use ClockCache
2020-12-01 20:25:42 +01:00
Max Kellermann
2a1dd55b11
event/Loop: include cleanup
2020-12-01 20:19:40 +01:00
Max Kellermann
be20f760ab
event/Loop: disallow copying
2020-12-01 20:18:33 +01:00
Max Kellermann
ef8797821f
event/Loop: inline field initializers
2020-12-01 20:07:35 +01:00
Max Kellermann
e286702f4c
event/Loop: rename AddDeferred() to AddDefer()
2020-12-01 17:26:39 +01:00
Max Kellermann
c58aaf545f
event/IdleEvent: make a special case of DeferEvent
2020-12-01 17:14:24 +01:00
Max Kellermann
990f2dc1cf
event/DeferEvent: use class IntrusiveList instead of boost::intrusive::list
2020-12-01 17:14:24 +01:00
Max Kellermann
774b4313f2
event/DeferEvent: split the thread-safe version into new class InjectEvent
2020-12-01 17:14:24 +01:00
Max Kellermann
65a1c4a016
event/Loop: pass SocketEvent& to AbandonFD()
2020-10-28 14:59:28 +01:00
Max Kellermann
8348a1ec8f
event/PollGroup: rename to PollBackend
2020-10-19 14:52:59 +02:00
Max Kellermann
e3270dfd68
event/SocketEvent: use class IntrusiveList<>
2020-10-18 20:02:47 +02:00
Max Kellermann
a14997ffb8
event/Loop: manage all SocketEvents in a linked list
...
Not only those which are "ready".
2020-10-18 20:01:38 +02:00
Max Kellermann
dd94f97572
event/Loop: un-inline AddFD(), ModifyFD()
...
Prepare for adding more code here.
2020-10-18 19:58:42 +02:00
Max Kellermann
f64799622d
event/IdleEvent: use class IntrusiveList<>
2020-10-18 19:28:12 +02:00
Max Kellermann
b611b1824a
event/Loop: move code to Wait()
2020-10-15 20:21:00 +02:00
Max Kellermann
abf9ae2dd9
event/Loop: rename Abandon() to AbandonFD()
2020-10-14 16:26:06 +02:00
Max Kellermann
5a4055fb08
event/SocketMonitor: refactor to SocketEvent
...
Similar to commits 1686f4e857
and
30a5dd267b
2020-10-14 15:54:12 +02:00
Max Kellermann
38dab040b3
event/Loop: add compile-time option to disable multithreading
...
Not for MPD, but for other applications which might want to copy its
event loop, but do not need multi-threading.
2020-10-14 14:08:38 +02:00
Max Kellermann
e9f6af61f9
event/Loop: forward-declare class {Idle,Defer}Event
2020-10-14 14:05:17 +02:00
Max Kellermann
b06c4e2711
event/{Idle,Defer}Event: use base_hook instead of member_hook
...
Allows forward declaration.
2020-10-14 14:04:30 +02:00
Max Kellermann
1686f4e857
event/IdleMonitor: refactor to IdleEvent
...
Instead of using this as a base class implementing a virtual method,
the new class IdleEvent can be used as a variable, decoupling
IdleMonitor's internal state from the derived class.
This is similar to commit 30a5dd267b
which refactored TimeoutMonitor to TimerEvent.
2020-10-14 13:47:25 +02:00
Max Kellermann
41bc17a27f
event/SocketMonitor: add ready_flags
...
By making each SocketMonitor keep track of its ready flags, this
removes a lot of overhead from EventLoop::RemoveFD().
2020-10-09 17:28:11 +02:00
Max Kellermann
eeb96eb367
event/TimerEvent: add type alias for std::chrono::steady_clock::duration
2020-10-08 20:48:50 +02:00
Max Kellermann
263b0ffdbb
event/TimerEvent: use auto_unlink hook
2020-10-08 20:46:15 +02:00
Max Kellermann
22bea5c97e
event/Loop: reorder includes
...
This just happened to break the Windows build because of the
`GetObject` macro in `windows.h`, so I added a kludge to
PollResultGeneric.hxx.
2020-10-08 20:43:21 +02:00
Max Kellermann
947856ca8e
event/Loop: forward-declare class TimerEvent
2020-10-08 17:24:32 +02:00
Max Kellermann
cd9ff9d9b0
event/TimerEvent: use base_hook instead of member_hook
2020-10-08 17:00:09 +02:00
Max Kellermann
4cd0f661d6
event/Loop: use using
instead of typedef
2020-10-08 16:59:21 +02:00
Max Kellermann
cdf8ac001c
event/Loop: integrate io_uring support
2020-05-05 17:13:14 +02:00
Max Kellermann
935e622915
event/Loop: allow calling AddFD()... before starting the EventThread
...
Relax the assertions. This is necessary if BlockingCall() is used
before the thread is started.
2020-05-05 17:10:17 +02:00