homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jhylton
Recipients
Date 2003年09月12日.17:14:46
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=31392
How does the bsddb wrapper achieve thread safety?
I know very little about the wrapper or the underlying bsddb
libraries. I found the following comment in the C API docs:
http://www.sleepycat.com/docs/ref/program/mt.html#2
> When using the non-cursor Berkeley DB calls to retrieve 
> key/data items (for example, DB->get), the memory to which
the 
> pointer stored into the Dbt refers is valid only until the
next call 
> using the DB handle returned by DB->open. This includes any 
> use of the returned DB handle, including by another thread 
> within the process.
This suggests that a call to a self->db->get() must process
its results (copy them into Python-owned memory) before any
other operation on the same db object can proceed. Is that
right?
The bsddb wrapper releases the GIL before calling the
low-level DB API functions and the acquires it after the
call returns. Is there some other lock that prevents
multiple simultaneous calls from stomping on each other?
History
Date User Action Args
2007年08月23日 14:15:03adminlinkissue775414 messages
2007年08月23日 14:15:03admincreate

AltStyle によって変換されたページ (->オリジナル) /