Paul Ellenbogen added the comment:

I think this behavior is due to the underlying behavior of the dbm. The same 
code using dbm, rather than shelve, also throws KeyErrors:

from multiprocessing import Process
import dbm

db = dbm.open("example.dbm", "c")
for i in range(100):
    db[str(i)] = str(i ** 2)


def parallel():
    for i in range(100):
        print(db[str(i)])

a = Process(target = parallel)
b = Process(target = parallel)
a.start()
b.start()
a.join()
b.join()

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26773>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to