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
This commit is contained in:
@@ -76,8 +76,19 @@ struct Instance final
|
||||
, public RemoteTagCacheHandler
|
||||
#endif
|
||||
{
|
||||
/**
|
||||
* A thread running an #EventLoop for non-blocking (bulk) I/O.
|
||||
*/
|
||||
EventThread io_thread;
|
||||
|
||||
/**
|
||||
* Another thread running an #EventLoop for non-blocking
|
||||
* (real-time) I/O. This is used instead of #io_thread for
|
||||
* events which require low latency, e.g. for filling hardware
|
||||
* ring buffers.
|
||||
*/
|
||||
EventThread rtio_thread;
|
||||
|
||||
MaskMonitor idle_monitor;
|
||||
|
||||
#ifdef ENABLE_NEIGHBOR_PLUGINS
|
||||
|
Reference in New Issue
Block a user