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.3.1"
Class Method Summary collapse
Class Method Details
.capture(*arguments, **options) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/async/process.rb', line 33 def self.capture(*arguments, **) input, output = Async::IO.pipe [:out] = output.io runner = Async do spawn(*arguments, **) ensure output.close end Sync do input.read ensure runner.wait input.close end end |