Class: DTAS::Sigevent
- Inherits:
-
SleepyPenguin::EventFD
- Object
- SleepyPenguin::EventFD
- DTAS::Sigevent
- Includes:
- SleepyPenguin
- Defined in:
- lib/dtas/sigevent/efd.rb,
lib/dtas/sigevent/pipe.rb
Overview
Copyright © 2013, Eric Wong <[email protected]> License: GPLv3 or later (www.gnu.org/licenses/gpl-3.0.txt)
Instance Attribute Summary collapse
-
#to_io ⇒ Object
readonly
:nodoc:.
Class Method Summary collapse
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize ⇒ Sigevent
constructor
A new instance of Sigevent.
- #readable_iter {|_self, nil| ... } ⇒ Object
- #signal ⇒ Object
Constructor Details
#initialize ⇒ Sigevent
Returns a new instance of Sigevent.
7 8 9 |
# File 'lib/dtas/sigevent/pipe.rb', line 7 def initialize @to_io, @wr = IO.pipe end |
Instance Attribute Details
#to_io ⇒ Object (readonly)
:nodoc:
5 6 7 |
# File 'lib/dtas/sigevent/pipe.rb', line 5 def to_io @to_io end |
Class Method Details
.new ⇒ Object
7 8 9 |
# File 'lib/dtas/sigevent/efd.rb', line 7 def self.new super(0, EventFD::CLOEXEC) end |
Instance Method Details
#close ⇒ Object
24 25 26 27 |
# File 'lib/dtas/sigevent/pipe.rb', line 24 def close @to_io.close @wr.close end |
#readable_iter {|_self, nil| ... } ⇒ Object
15 16 17 18 19 |
# File 'lib/dtas/sigevent/efd.rb', line 15 def readable_iter value(true) yield self, nil # calls DTAS::Process.reaper :wait_readable end |
#signal ⇒ Object
11 12 13 |
# File 'lib/dtas/sigevent/efd.rb', line 11 def signal incr(1) end |