Thread/Process-safety of functions in the Standard Library, eg the dbm classes

Thomas Heller theller at python.net
Tue Apr 9 14:07:53 EDT 2002


"Gerson Kurz" <gerson.kurz at t-online.de> wrote in message news:3cb32a63.17540718 at news.t-online.de...
> I wonder if it is documented which functions of the Python Standard
> Library are threadsafe, and which not. More explicitly, I was having a
> look at the anydbm interface and am pretty sure that it is not safe to
> access from multiple-processes at the same time, and I don't even know
> whether or not it is safe for multiple threads.
>
> So, is there such a documentation?
>
> Furthermore, do you have any suggestions for these requirements: I
> want to be able to store some data (<100K), and access it from
> multiple processes in a safe way. Currently I'm using mySQL with
> mysqldb, which seems like heavy overkill for that amount of data.
> Plus, I want users to use my program without having to first install
> MySQL (or any other dbm for that matter).
>
> [A hardcore idea would be to make a "anydbm-server" that you can
> communicate with using sockets ;]

Sound like a job for Gadfly ;-)
Gadfly includes a server which communicates via sockets with the
backend, IIRC.

Thomas





More information about the Python-list mailing list