Exception: RubyReactor::Error::AsyncResultPending

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby_reactor/error/async_result_pending.rb

Overview

Raised inside a WORKER when result(:name) references an async_step / async_reactor that is not yet terminal. Instead of blocking the worker thread for the whole wait (the sync-caller behavior), the executor parks: exclusive lock / semaphore stay HELD (recorded on the context), the job re-enqueues itself via the snooze path, and the wait resumes on redelivery. Bounded by Configuration#async_park_timeout, enforced at the wait site before this is raised.

Instance Attribute Summary collapse

Attributes inherited from Base

#context, #original_error, #step

Instance Method Summary collapse

Constructor Details

#initialize(message, channel: nil) ⇒ AsyncResultPending

Returns a new instance of AsyncResultPending.



15
16
17
18
# File 'lib/ruby_reactor/error/async_result_pending.rb', line 15

def initialize(message, channel: nil)
  super(message)
  @channel = channel
end

Instance Attribute Details

#channelObject (readonly)

Returns the value of attribute channel.



13
14
15
# File 'lib/ruby_reactor/error/async_result_pending.rb', line 13

def channel
  @channel
end