[py-dev] execnet hangs

Armin Rigo arigo at tunes.org
Fri Apr 8 12:52:43 CEST 2005


Hi Holger,

On Fri, Apr 08, 2005 at 12:41:16PM +0200, holger krekel wrote:
> Full ack.  However, nobody forces us to deadlock if we are 
> exceeding the number of maximum threads. 

My point is that perfectly reasonable examples cause deadlocks because of this
"feature".  Detecting the problem and throwing an exception is not a good
solution either.  It causes nice small programs to start crashing when you
scale them up.

I don't see why we can't just document: "remote_exec() creates a new thread on
the remote side", and be done with it.  A program needs to seriously screw up
to produce a ton of calls to remote_exec() and starve the resources; it is
just the same as a program that, by error, calls thread.start_new_thread() far
too many times.  It could occur, but I've never seen that problem in practice
and I'm definitely on the opinion that any default bound like 10 -- even if
you can disable it -- is going to cause bugs.  (And 10 is worse than 2 because
you need to scale more before you see the bug.)

I don't mind if you want to enforce a bound in some situations but the default
should be no bound.


Armin



More information about the Pytest-dev mailing list