Class: ProcessShared::Process
- Inherits:
-
Object
- Object
- ProcessShared::Process
- 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
-
.abort_on_exception ⇒ Object
How the heck will I implement this…
- .abort_on_exception=(val) ⇒ Object
-
.current ⇒ Object
This can’t really work since each thread is a separate process..
- .kill(process) ⇒ Object
Instance Method Summary collapse
Class Method Details
.abort_on_exception ⇒ Object
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 |
.current ⇒ Object
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 |