Global Lock for Python Threading ? - Re: "RuntimeError: dictionary changed ...
robert
no-spam at no-spam-no-spam.com
Sat Mar 11 19:14:33 EST 2006
robert wrote:
>
> Guess it would be more wise to not expose deepcopy, cPickle.dump etc. to
> this kind of RuntimeError unnecessarily.
> The speed gain of the iterator-method - if any - is minor, compared to
> the app crash problems, which are not easy to discover and work-around
> (because they happen rarely on fast computers).
searched the thread, threading module for a function for generally
locking/dislocking all other python threads from execution. Did not find
something like that.
(That would be very useful in some threading applications to protect
critical sections without forcing the whole application to be populated
with lock objects.
Of course, such function should be used with care (and "finally") - but
it should be there to make thread programming easier...)
Robert
More information about the Python-list
mailing list