Module: Async::Process
- Defined in:
- lib/async/process.rb,
lib/async/process/child.rb,
lib/async/process/version.rb
Defined Under Namespace
Classes: Child
Constant Summary collapse
- VERSION =
"1.4.0"
Class Method Summary collapse
Class Method Details
.capture(*arguments, **options) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/async/process.rb', line 18 def self.capture(*arguments, **) input, output = ::IO.pipe [:out] = output runner = Async do spawn(*arguments, **) ensure output.close end Sync do input.read ensure runner.wait input.close end end |