Method: Corosync::Quorum#dispatch
- Defined in:
- lib/corosync/quorum.rb
#dispatch(timeout = -1)) ⇒ Boolean
Checks for a single pending event and triggers the appropriate callback if found.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/corosync/quorum.rb', line 97 def dispatch(timeout = -1) if !timeout != 0 then timeout = nil if timeout == -1 select([@fd], [], [], timeout) end begin Corosync.cs_send!(:quorum_dispatch, @handle, Corosync::CS_DISPATCH_ONE_NONBLOCKING) rescue Corosync::TryAgainError => e raise e if e.depth > 1 # this exception is from a nested corosync function, not our quorum_dispatch we just called return false end return true end |