Class: Isomorfeus::Speednode::Runtime::VM
- Inherits:
-
Object
- Object
- Isomorfeus::Speednode::Runtime::VM
- Defined in:
- lib/isomorfeus/speednode/runtime.rb
Class Method Summary collapse
Instance Method Summary collapse
- #delete_context(context) ⇒ Object
- #exec(context, source) ⇒ Object
- #execp(context, source) ⇒ Object
-
#initialize(options) ⇒ VM
constructor
A new instance of VM.
- #start ⇒ Object
- #started? ⇒ Boolean
Constructor Details
#initialize(options) ⇒ VM
Returns a new instance of VM.
23 24 25 26 27 28 29 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 23 def initialize() @mutex = Mutex.new @socket_path = nil @options = @started = false @socket = nil end |
Class Method Details
Instance Method Details
#delete_context(context) ⇒ Object
50 51 52 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 50 def delete_context(context) command("deleteContext", context) end |
#exec(context, source) ⇒ Object
42 43 44 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 42 def exec(context, source) command("exec", {'context' => context, 'source' => source}) end |
#execp(context, source) ⇒ Object
46 47 48 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 46 def execp(context, source) command("execp", {'context' => context, 'source' => source}) end |
#start ⇒ Object
54 55 56 57 58 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 54 def start @mutex.synchronize do start_without_synchronization end end |
#started? ⇒ Boolean
31 32 33 |
# File 'lib/isomorfeus/speednode/runtime.rb', line 31 def started? @started end |