Class: Rubyagents::Sandbox::Executor
- Inherits:
-
Object
- Object
- Rubyagents::Sandbox::Executor
show all
- Defined in:
- lib/rubyagents/sandbox.rb
Overview
Executor strategy — selected once at load time based on the Ruby engine.
Adding a new backend (e.g. TruffleRuby) is a new subclass + one constant.
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
14
15
16
|
# File 'lib/rubyagents/sandbox.rb', line 14
def self.for_platform
RUBY_ENGINE == "jruby" ? ThreadExecutor : ForkExecutor
end
|
Instance Method Details
#call(_timeout, &_block) ⇒ Object
18
19
20
|
# File 'lib/rubyagents/sandbox.rb', line 18
def call(_timeout, &_block)
raise NotImplementedError, "#{self.class}#call not implemented"
end
|