Message126603
> 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? |
|
Date |
User |
Action |
Args |
2011-01-20 13:07:41 | pitrou | set | recipients:
+ pitrou, brett.cannon, amaury.forgeotdarc, vstinner, henrietta |
2011-01-20 13:07:40 | pitrou | link | issue10923 messages |
2011-01-20 13:07:40 | pitrou | create | |
|