class Concurrent::Promises::ResolvableEvent
A Event which can be resolved by user.
def resolve(raise_on_reassign = true, reserved = false)
-
reserved
(true, false
) --
def resolve(raise_on_reassign = true, reserved = false) resolve_with RESOLVED, raise_on_reassign, reserved end
def wait(timeout = nil, resolve_on_timeout = false)
- See: AbstractEventFuture#wait -
Returns:
-
(self, true, false)
-
Parameters:
-
resolve_on_timeout
(true, false
) --
def wait(timeout = nil, resolve_on_timeout = false) super(timeout) or if resolve_on_timeout # if it fails to resolve it was resolved in the meantime # so return true as if there was no timeout !resolve(false) else false end end
def with_hidden_resolvable
-
(Event)
-
def with_hidden_resolvable @with_hidden_resolvable ||= EventWrapperPromise.new_blocked_by1(self, @DefaultExecutor).event end