mailbox 0.2.3 → 0.2.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/VERSION.yml +1 -1
- data/lib/mailbox.rb +4 -0
- data/mailbox.gemspec +2 -2
- data/test/mailbox_test.rb +20 -0
- metadata +3 -3
data/VERSION.yml
CHANGED
data/lib/mailbox.rb
CHANGED
data/mailbox.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{mailbox}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Joel Friedman", "Patrick Farley"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-06-02}
|
13
13
|
s.description = %q{Mailbox is a JRuby module that simplifies concurrency and is backed by JVM threads.}
|
14
14
|
s.email = %q{asher.friedman@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/test/mailbox_test.rb
CHANGED
@@ -291,4 +291,24 @@ class MailboxTest < Test::Unit::TestCase
|
|
291
291
|
assert_equal expected, test_agent.msg_info
|
292
292
|
end
|
293
293
|
|
294
|
+
def test_dispose
|
295
|
+
klass = Class.new do
|
296
|
+
include Mailbox
|
297
|
+
mailslot
|
298
|
+
def count_down(latch)
|
299
|
+
latch.count_down
|
300
|
+
end
|
301
|
+
end
|
302
|
+
|
303
|
+
test_agent = klass.new
|
304
|
+
latch = JRL::Concurrent::Latch.new 1
|
305
|
+
test_agent.count_down latch
|
306
|
+
assert latch.await(1), "timed out waiting for first latch"
|
307
|
+
|
308
|
+
test_agent.dispose
|
309
|
+
|
310
|
+
latch = JRL::Concurrent::Latch.new 1
|
311
|
+
test_agent.count_down latch
|
312
|
+
assert !latch.await(1), "latch didn't time out after fiber was disposed"
|
313
|
+
end
|
294
314
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 4
|
9
|
+
version: 0.2.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Joel Friedman
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-06-02 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|