Using time.sleep() in 2 threads causes lockup whenhyper-threading is enabled

Delaney, Timothy (Tim) tdelaney at avaya.com
Mon May 8 17:57:04 EDT 2006


OlafMeding at gmail.com wrote:

> I am a bit surprised that nobody else has tried running the short
> Python program above on a hyper-threading or dual core / dual
> processor system.

Does it happen every time? Have you tried it on multiple machines? Is it
possible that that one machine is having problems? Does it take the same
amount of time each run to replicate - and if so, how long is that (give
or take a minute)?

Until you can answer these questions with definite answers, people are
not going to dedicate machines *that they use* for hours on end trying
to replicate it. And from this thread, the time required appears to be
"minutes to hours". That suggests you have a race condition which
results in a deadlock - and of course, that is more likely to occur on a
dual-core or dual-cpu machine, as you really have multiple threads
executing at once.

I'm surprised that so many people have been willing to dedicate as much
time as they have, but then again considering the people involved it's
not quite so surprising.

Tim Delaney



More information about the Python-list mailing list