Class: Temporalio::Runtime Private

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/temporalio/runtime.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRuntime

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Runtime.



12
13
14
15
# File 'lib/temporalio/runtime.rb', line 12

def initialize
  @core_runtime = Temporalio::Bridge::Runtime.init
  @reactor = Temporalio::Worker::Reactor.new
end

Instance Attribute Details

#core_runtimeObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
# File 'lib/temporalio/runtime.rb', line 10

def core_runtime
  @core_runtime
end

#reactorObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
# File 'lib/temporalio/runtime.rb', line 10

def reactor
  @reactor
end

Instance Method Details

#ensure_callback_loopObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



17
18
19
20
21
22
23
# File 'lib/temporalio/runtime.rb', line 17

def ensure_callback_loop
  return if @thread

  @thread = Thread.new do
    core_runtime.run_callback_loop
  end
end