Are min() and max() thread-safe?
Steven D'Aprano
steven at REMOVE.THIS.cybersource.com.au
Thu Sep 17 00:39:12 EDT 2009
On Thu, 17 Sep 2009 04:33:05 +0000, Steven D'Aprano wrote:
> I have two threads, one running min() and the other running max() over
> the same list. I'm getting some mysterious results which I'm having
> trouble debugging. Are min() and max() thread-safe, or am I doing
> something fundamentally silly by having them walk over the same list
> simultaneously?
>
> My code is as follows. Is there anything obviously wrong with it?
[snip]
For clarity, I'm not (yet) asking for help debugging the errors I'm
getting -- if I were, I would post a minimal example and a traceback. I'm
just looking for reassurance that I'm not being an idiot for even
attempting what I'm doing.
Thank you.
--
Steven
More information about the Python-list
mailing list