[pybsddb] concurrent access dictionaries
Benjamin Rutt
rutt.4 at osu.edu
Sat Oct 3 21:21:46 CEST 2009
The docs say (for the version shipped with python 2.6), in
http://www.jcea.es/programacion/pybsddb_doc/4.7.3/introduction.html#introduction
:
"3. Concurrent access dictionaries: This refers to the ability to
simultaneously have one writer and multiple readers of a DB (either in
multiple threads or processes) and is implemented simply by creating a DBEnv
with certain flags. No extra work is required to allow this access mode in
bsddb3."
Could someone elaborate on exactly which "certain flags" are needed when
creating the DBEnv to achieve the goal here in #3? Did I get it right below
(for the b-tree access method)?
from bsddb import db
env = db.DBEnv()
env.open('/some/dir', db.DB_CREATE | db.DB_THREAD | db.DB_INIT_CDB |
db.DB_INIT_MPOOL)
dbh = db.DB(env)
dbh.open("foo.db", None, db.DB_BTREE, db.DB_CREATE)
Thanks!
--
Benjamin Rutt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jcea.es/pipermail/pybsddb/attachments/20091003/a87796ee/attachment.htm>
More information about the pybsddb
mailing list