Commit Graph

9 Commits

Author SHA1 Message Date
Max Kellermann
6c67408944 event/Loop: add flag alive
This replaces the old `dead` flag which was unreliable; it was `false`
if the EventThread was not yet started, which could cause deadlocks in
BlockingCall().
2019-02-05 22:38:45 +01:00
Max Kellermann
ce49d99c2f check.h: remove obsolete header
Since we switched from autotools to Meson in commit
94592c1406, we don't need to include
`config.h` early to properly enable large file support.  Meson passes
the required macros on the compiler command line instead of defining
them in `config.h`.

This means we can include `config.h` at any time, whenever we want to
check its macros, and there are no ordering constraints.
2018-11-19 16:33:49 +01:00
Max Kellermann
a8bf8ede01 event/Thread: reduce the RTIO timer slack to 10us
MPD's default is 100ms, which is too long for the real-time I/O
thread.  The OutputThread has 100us, but the real-time I/O thread
might have tighter deadlines.

This change has currently no effect (I believe), because nobody uses
timers on the RTIO thread.
2018-11-14 12:11:57 +01:00
Max Kellermann
f5c9071494 *: copyright year 2018 2018-10-31 17:54:59 +01:00
Max Kellermann
d29d186d62 output/alsa: use a new I/O thread with real-time scheduling
The normal I/O event thread can have a large latency, e.g. when
libgnutls loads all TLS CA certificates for a https connect.  This
makes it unreliable for the ALSA I/O notifications, and causes ring
buffer xruns.  To avoid interfering with high latency events such as
CURL's, we move the ALSA I/O events to a separate I/O thread which
also obtains real-time scheduling (if possible).

Closes #221
2018-02-16 22:38:55 +01:00
Max Kellermann
19af364400 event/Thread: add "noexcept" 2018-01-29 23:11:15 +01:00
Max Kellermann
781487c4dd thread/Thread: use BoundMethod 2017-02-10 22:46:09 +01:00
Max Kellermann
9324fbf921 event/Thread: remove the Mutex
We don't need to access Thread::handle early inside the EventThread,
so we don't need this trick anymore.
2017-02-10 22:29:31 +01:00
Max Kellermann
de80c270bd IOThread: move code to class EventThread 2017-02-10 21:40:39 +01:00