[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] splice: fix missing F_NONBLOCK flag for single output
From: |
Eric Wong |
Subject: |
[PATCH] splice: fix missing F_NONBLOCK flag for single output |
Date: |
Wed, 2 Jan 2019 23:15:41 +0000 |
This fixes hanging when using a single audio output for
Linux users using splice.
---
lib/dtas/buffer/splice.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/dtas/buffer/splice.rb b/lib/dtas/buffer/splice.rb
index c6c0ee2..281ecfd 100644
--- a/lib/dtas/buffer/splice.rb
+++ b/lib/dtas/buffer/splice.rb
@@ -32,7 +32,7 @@ def discard(bytes)
def broadcast_one(targets, limit = nil)
# single output is always non-blocking
limit ||= MAX_AT_ONCE_1
- s = SleepyPenguin.splice(@to_io, targets[0], limit, F_MOVE, TRY)
+ s = SleepyPenguin.splice(@to_io, targets[0], limit, F_MOVE|F_NONBLOCK, TRY)
if Symbol === s
targets # our one and only target blocked on write
else
--
EW
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] splice: fix missing F_NONBLOCK flag for single output,
Eric Wong <=