diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-12-03 17:27:53 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-12-03 17:27:53 -0800 |
commit | c6c2f7782e2270ee4684d2405376a186aa806fcd (patch) | |
tree | 14efa83fc750b24fa2213dd64f6ddc9fd1b3b915 /lib/tdb.rb | |
parent | 2a31a29a3398b645722b9ce77a2987948289706e (diff) | |
download | ruby-tdb-c6c2f7782e2270ee4684d2405376a186aa806fcd.tar.gz |
Thread-safety is useful sometimes and needless overhead otherwise. Default to whatever TDB upstream defaults to.
Diffstat (limited to 'lib/tdb.rb')
-rw-r--r-- | lib/tdb.rb | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1,2 +1,16 @@ # -*- encoding: binary -*- require 'tdb_ext' +class TDB + autoload :MT, 'tdb/mt' + + # makes the current TDB object thread-safe + def threadsafe! + extend MT + end + + # will return true when TDB::MT is included in TDB or the TDB + # object is extended by TDB + def threadsafe? + false + end +end |