This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients amaury.forgeotdarc, brett.cannon, henrietta, pitrou, vstinner
Date 2011-01-20.13:07:40
SpamBayes Score 0.00025814158
Marked as misclassified No
Message-id <1295528856.3705.13.camel@localhost.localdomain>
In-reply-to <1295526906.22.0.258909344564.issue10923@psf.upfronthosting.co.za>
Content
> If it is impossible to detect deadlocks, can't we raise an exception
> if two threads try to import a module at the same time? (change
> completly how the import "lock" is handled)
> 
> Antoine changed recently the io module to raise a RuntimeError on
> reentrant calls in the io module (io.Buffered*.*()): #10478.

Reentrant calls and concurrent calls are not the same. If the import
lock is changed to raise an exception, heaps of multi-threaded software
will be broken.

What we could do is set a timeout on the import lock, but then we need
to choose a rather large one (e.g. 5 minutes), and who will wait 5
minutes before killing the process?
History
Date User Action Args
2011-01-20 13:07:41pitrousetrecipients: + pitrou, brett.cannon, amaury.forgeotdarc, vstinner, henrietta
2011-01-20 13:07:40pitroulinkissue10923 messages
2011-01-20 13:07:40pitroucreate