lib/corosync/cmap.rb
# Checks for a single pending event and triggers the appropriate callback if found.
# @param timeout [Integer] How long to wait for an event.
#   * +-1+: Indefinite. Wait forever
#   * +0+: Non-blocking. If there isn't a pending event, return immediately
#   * +>0+: Wait the specified number of seconds.
# @return [Boolean] Returns +True+ if an event was triggered. Otherwise +False+.
Checks for a single pending event and triggers the appropriate callback if found.
Checks for a single pending event and triggers the appropriate callback if found .
def dispatch(timeout = -1)
		if !timeout != 0 then
			timeout = nil if timeout == -1
			select([@fd], [], [], timeout)
		end
		begin
			Corosync.cs_send!(:cmap_dispatch, @handle, Corosync::CS_DISPATCH_ONE_NONBLOCKING)
		rescue Corosync::TryAgainError => e
			raise e if e.depth > 1 
			return false
		end
		return true
	end
def dispatch ( timeout = - 1 ) if ! timeout != 0 then timeout = nil if timeout == - 1 select ( [ @fd ] , [ ] , [ ] , timeout ) end begin Corosync . cs_send! ( :cmap_dispatch , @handle , Corosync :: CS_DISPATCH_ONE_NONBLOCKING ) rescue Corosync :: TryAgainError => e raise e if e . depth > 1 return false end return true end
Checks for a single pending event and triggers the appropriate callback if found.
Checks for a single pending event and triggers the appropriate callback if found .
# this exception is from a nested corosync function, not our quorum_dispatch we just called
Returns +True+ if an event was triggered. Otherwise +False+.
Returns + True + if an event was triggered . Otherwise + False + .
Boolean
timeout
None