TokyoCabinet pseudo-environment
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 26 Jan 2011 17:36:55 +0000 (18:36 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 26 Jan 2011 17:39:44 +0000 (18:39 +0100)
commit557a391d9253222ca80bb09c416bbe1eaf3c71a5
treedf416fcc5cb7d5e4abb0520cd190b74ec2816887
parentfa0064fcaef60e4ab4d2ec48beb0a07db3cc497c
TokyoCabinet pseudo-environment

Since TokyoCabinet does not provide a DB environment, trying to reopen
the same db multiple times (something that happens with subregistry
mostly, and possibly after rescans) causes the subsequent opens to fail
due to "threading errors".

Fix by implementing some sort of environmentalish database management
(only keeps track of open databases, returns existing ones if reopening
the same db multiple times, closes all of them on exit).
lib/rbot/registry/tc.rb