Berkely DB – many writers, many readers
Andy Leszczynski
leszczynscyATnospam.yahoo.com.nospam
Sun Aug 7 01:23:33 EDT 2005
Eric S. Johansson wrote:
> Andy Leszczynski wrote:
>
>>
>> I need to now option I open the Berkley DB (both db and env) to have
>> configuration for multiple writers and multiple readers. Via multiple
>> processes and multiple threads. No trx needed.
>
>
> the simple answer is you can't. bdbm is probably single writer multiple
> reader. I believe if you use of the the most recent sleepy cat
> database, you have support for multiple readers and writers in any context.
[...]
I have learned later that you can, just use Concurrent DB poruct
(db.DB_INIT_CDB):
...envflags=db.DB_CREATE|db.DB_INIT_MPOOL|db.DB_THREAD|db.DB_INIT_CDB
...env.open(file,envflags)
A.
More information about the Python-list
mailing list