Dictionary inserts and threads

Paul Rubin http
Sat Jan 27 11:49:12 EST 2007


"Martin P. Hellwig" <mhellwig at xs4all.nl> writes:
> I assume that this is not a problem, but since assuming something
> gives a lot of room for screw-ups I rather ask beforehand if I should
> except all kinds of troubles when multiple threads update 'at the same
> time' a dictionary or that I should lock the dictionary, for each
> update?

Use a lock, or serialize the updates through a queue.



More information about the Python-list mailing list