Module: Circuitry::Concerns::Async
- Included in:
- Publisher, Subscriber
- Defined in:
- lib/circuitry/concerns/async.rb
Instance Method Summary collapse
Instance Method Details
#platform_supports_async? ⇒ Boolean
13 14 15 |
# File 'lib/circuitry/concerns/async.rb', line 13 def platform_supports_async? Circuitry.platform_supports_async? end |
#process_asynchronously(&block) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/circuitry/concerns/async.rb', line 6 def process_asynchronously(&block) raise NotSupportedError, 'Your platform does not support forking' unless platform_supports_async? pid = fork(&block) Process.detach(pid) end |