summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-24 22:09:35 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-24 22:09:35 +0000
commite37f8c0f0b7e429f89d53d7f31318f0941f6b735 (patch)
treeac9892f8a51214282695ad06dbfaf20f476700dd
parent77b885264bda990e13fe385199f31c90e0ae668a (diff)
* lib/rinda/tuplespace.rb: Only return tuple entry once on move,
either through port or regular return, not both. This results in a 120% speedup when combined with #8125. Patch by Joel VanderWerf. [ruby-trunk - Feature #8119] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--lib/rinda/tuplespace.rb4
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 837207a..35da5a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Mon Mar 25 07:09:20 2013 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rinda/tuplespace.rb: Only return tuple entry once on move,
+ either through port or regular return, not both. This results in a
+ 120% speedup when combined with #8125. Patch by Joel VanderWerf.
+ [ruby-trunk - Feature #8119]
+
Mon Mar 25 06:59:01 2013 Eric Hodel <drbrain@segment7.net>
* test/rinda/test_rinda.rb: Skip IPv6 tests if no IPv6 addresses
diff --git a/lib/rinda/tuplespace.rb b/lib/rinda/tuplespace.rb
index ba494aa..ee2bef1 100644
--- a/lib/rinda/tuplespace.rb
+++ b/lib/rinda/tuplespace.rb
@@ -491,7 +491,7 @@ module Rinda
port.push(entry.value) if port
@bag.delete(entry)
notify_event('take', entry.value)
- return entry.value
+ return port ? nil : entry.value
end
raise RequestExpiredError if template.expired?
@@ -506,7 +506,7 @@ module Rinda
port.push(entry.value) if port
@bag.delete(entry)
notify_event('take', entry.value)
- return entry.value
+ return port ? nil : entry.value
end
template.wait
end