shelve and concurrency

  • Thread starter Michele Simionato
  • Start date
M

Michele Simionato

The standard library says:
"""
The shelve module does not support concurrent read/write access to
shelved objects. (Multiple simultaneous read accesses are safe.) When a
program has a shelf open for writing, no other program should have it
open for reading or writing.
"""

But what about threads? If a single program open a shelve and many
threads
try to write simultaneously to it, do I get an error? I would say yes,
but after various attempts, I cannot get it, at least on Linux, where
shelve is using dbhash as database. Can somebody share any light,
please?

Michele Simionato
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,162
Latest member
GertrudeMa
Top