ichannel 5.1.1.3 → 5.1.1.4
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/ChangeLog.txt +4 -0
- data/README.md +21 -4
- data/lib/ichannel/version.rb +1 -1
- data/lib/ichannel.rb +1 -1
- metadata +3 -3
data/ChangeLog.txt
CHANGED
data/README.md
CHANGED
@@ -12,10 +12,10 @@ __OVERVIEW__
|
|
12
12
|
__DESCRIPTION__
|
13
13
|
|
14
14
|
ichannel simplifies interprocess communication by providing a bi-directional
|
15
|
-
channel that can transport ruby objects between processes on the same
|
16
|
-
All communication on a channel occurs on a streamed UNIXSocket that a
|
17
|
-
uses to queues its messages (ruby objects), and also to ensure that
|
18
|
-
are received in the order they are sent.
|
15
|
+
channel that can be used to transport ruby objects between processes on the same
|
16
|
+
machine. All communication on a channel occurs on a streamed UNIXSocket that a
|
17
|
+
channel uses to queues its messages (ruby objects), and also to ensure that
|
18
|
+
messages are received in the order they are sent.
|
19
19
|
|
20
20
|
__SERIALIZATION__
|
21
21
|
|
@@ -46,6 +46,23 @@ channel.get # => 'Hello!'
|
|
46
46
|
|
47
47
|
__2.__
|
48
48
|
|
49
|
+
Knowing when a channel is readable can be useful so that you can avoid a
|
50
|
+
blocking read. This (bad) example demonstrates how to do that:
|
51
|
+
|
52
|
+
```ruby
|
53
|
+
channel = IChannel.new Marshal
|
54
|
+
pid = fork do
|
55
|
+
sleep 3
|
56
|
+
channel.put 42
|
57
|
+
end
|
58
|
+
until channel.readable?
|
59
|
+
sleep 1
|
60
|
+
channel.get # => 42
|
61
|
+
end
|
62
|
+
```
|
63
|
+
|
64
|
+
__3.__
|
65
|
+
|
49
66
|
MessagePack doesn't implement `dump` or `load` but a wrapper can be easily
|
50
67
|
written:
|
51
68
|
|
data/lib/ichannel/version.rb
CHANGED
data/lib/ichannel.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ichannel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.1.1.
|
4
|
+
version: 5.1.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -46,7 +46,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
46
46
|
version: '0'
|
47
47
|
segments:
|
48
48
|
- 0
|
49
|
-
hash: -
|
49
|
+
hash: -3132810581347906708
|
50
50
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
@@ -55,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
55
55
|
version: '0'
|
56
56
|
segments:
|
57
57
|
- 0
|
58
|
-
hash: -
|
58
|
+
hash: -3132810581347906708
|
59
59
|
requirements: []
|
60
60
|
rubyforge_project:
|
61
61
|
rubygems_version: 1.8.23
|