iprocess 5.1.1 → 5.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -52,10 +52,9 @@ IProcess.spawn 5, Worker.new # => [2, 2, 2, 2, 2]
52
52
  ```
53
53
  __3.__
54
54
 
55
- A demo of how you would spawn two subprocesses asynchronously.
56
- Although the subprocesses are spawned asynchrounsly you can still
57
- communicate by defining a callback the subprocess can call when it completes.
58
- The example may not be the best, though:
55
+ A demo of how to spawn two subprocesses asynchronously.
56
+ The `Inbox#recv` method is a callback that XPool calls when a subprocess has
57
+ finished executing. The example may not be the best, though:
59
58
 
60
59
  ```ruby
61
60
  class Inbox
data/lib/iprocess.rb CHANGED
@@ -104,6 +104,8 @@ class IProcess
104
104
  #
105
105
  def result
106
106
  Process.wait(@pid)
107
- @channel.recv if @channel.readable?
107
+ if @channel.readable?
108
+ @channel.recv
109
+ end
108
110
  end
109
111
  end
@@ -1,3 +1,3 @@
1
1
  class IProcess
2
- VERSION = '5.1.1'
2
+ VERSION = '5.1.2'
3
3
  end
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iprocess
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.1
4
+ version: 5.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -47,7 +47,7 @@ files:
47
47
  - lib/iprocess.rb
48
48
  - lib/iprocess/version.rb
49
49
  - test/setup.rb
50
- - test/support/inbox_class.rb
50
+ - test/support/inbox.rb
51
51
  - test/test_IProcess_class.rb
52
52
  homepage: https://github.com/robgleeson/iprocess
53
53
  licenses: []
@@ -76,6 +76,6 @@ summary: A number of abstractions on top of spawning subprocesses and interproce
76
76
  communication.
77
77
  test_files:
78
78
  - test/setup.rb
79
- - test/support/inbox_class.rb
79
+ - test/support/inbox.rb
80
80
  - test/test_IProcess_class.rb
81
81
  has_rdoc: