Class: Temporal::Runtime

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRuntime

Returns a new instance of Runtime.



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

def initialize
  @core_runtime = Temporal::Bridge::Runtime.init
end

Instance Attribute Details

#core_runtimeObject (readonly)

Returns the value of attribute core_runtime.



8
9
10
# File 'lib/temporal/runtime.rb', line 8

def core_runtime
  @core_runtime
end

Instance Method Details

#ensure_callback_loopObject



14
15
16
17
18
19
20
# File 'lib/temporal/runtime.rb', line 14

def ensure_callback_loop
  return if @thread

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