From 56378c0fc1704cab0e0e1e6800befaf84e419b43 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 10 Dec 2010 18:05:41 -0800 Subject: mt: just break when attempting TDB methods inside #each Too tricky to support, for now. --- lib/tdb/mt.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'lib/tdb/mt.rb') diff --git a/lib/tdb/mt.rb b/lib/tdb/mt.rb index 7e7a09d..7ff2196 100644 --- a/lib/tdb/mt.rb +++ b/lib/tdb/mt.rb @@ -12,19 +12,13 @@ module TDB::MT lockall trylockall unlockall lockall_read trylockall_read unlockall_read lockall_mark lockall_unmark - clear + clear each ) wrap_methods << :repack if TDB.method_defined?(:repack) wrap_methods.each do |meth| eval "def #{meth}(*args); @lock.synchronize { super }; end" end - def each(&block) - @lock.synchronize do - super { |k,v| @lock.exclusive_unlock { yield(k,v) } } - end - end - def threadsafe? true end -- cgit v1.2.3-24-ge0c7