Class: DTAS::Pipe
Overview
pipe wrapper for -player sinks
Direct Known Subclasses
Constant Summary collapse
- F_SETPIPE_SZ =
1031
- F_GETPIPE_SZ =
1032
Instance Attribute Summary collapse
-
#sink ⇒ Object
Returns the value of attribute sink.
Attributes included from WritableIter
Class Method Summary collapse
Instance Method Summary collapse
-
#nonblock? ⇒ Boolean
avoid syscall, we never change IO#nonblock= directly.
- #pipe_size=(nr) ⇒ Object
Methods included from WritableIter
#ready_write_optimized?, #wait_writable_prepare, #writable_iter, #writable_iter_init
Instance Attribute Details
#sink ⇒ Object
Returns the value of attribute sink.
10 11 12 |
# File 'lib/dtas/pipe.rb', line 10 def sink @sink end |
Class Method Details
.new ⇒ Object
17 18 19 20 21 |
# File 'lib/dtas/pipe.rb', line 17 def self.new _, w = rv = pipe w.writable_iter_init rv end |
Instance Method Details
#nonblock? ⇒ Boolean
avoid syscall, we never change IO#nonblock= directly
36 37 38 |
# File 'lib/dtas/pipe.rb', line 36 def nonblock? false end |
#pipe_size=(nr) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/dtas/pipe.rb', line 23 def pipe_size=(nr) fcntl(F_SETPIPE_SZ, nr) if defined?(F_SETPIPE_SZ) rescue Errno::EINVAL # old kernel rescue Errno::EPERM # resizes fail if Linux is close to the pipe limit for the user # or if the user does not have permissions to resize end |