Class: ProcessShared::Process

Inherits:
Object
  • Object
show all
Defined in:
lib/process_shared/thread.rb

Overview

API-compatible with Ruby Thread class but using ProcessShared primitives instead (i.e. each Thread will be a separate OS process).

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.abort_on_exceptionObject

How the heck will I implement this…



8
9
# File 'lib/process_shared/thread.rb', line 8

def abort_on_exception
end

.abort_on_exception=(val) ⇒ Object



11
12
# File 'lib/process_shared/thread.rb', line 11

def abort_on_exception=(val)
end

.currentObject

This can’t really work since each thread is a separate process..



15
16
# File 'lib/process_shared/thread.rb', line 15

def current
end

.kill(process) ⇒ Object



18
19
20
# File 'lib/process_shared/thread.rb', line 18

def kill(process)
  ::Process.kill(process.pid)
end

Instance Method Details

#join(limit = nil) ⇒ Object



23
24
25
26
27
28
# File 'lib/process_shared/thread.rb', line 23

def join(limit = nil)
  if limit
  else
    ::Process.wait(pid)
  end
end