Message110323
On Wed, Jul 14, 2010 at 12:34, Antoine Pitrou <report@bugs.python.org>wrote:
>
> Antoine Pitrou <pitrou@free.fr> added the comment:
>
> > So I say we don't worry about loaders being thread-safe. If __import__
> > handles the locking for a specific module then it will hold the lock
> > on behalf of the loader.
>
> Yes but what happens if two different modules are imported from two
> different threads, and handled by the same loader? The loader could have
> global structures which rely on serialization of imports for
> consistency.
>
That's why I said we should supply a context decorator (or function) which
will handle the lock appropriately, taking the name of the module to import
as an argument so the locking is fine-grained. |
File name |
Uploaded |
unnamed
|
brett.cannon,
2010-07-14.19:59:35
|
|
Date |
User |
Action |
Args |
2010-07-14 19:59:37 | brett.cannon | set | recipients:
+ brett.cannon, gvanrossum, ncoghlan, belopolsky, pitrou, christian.heimes, grahamd |
2010-07-14 19:59:36 | brett.cannon | link | issue9260 messages |
2010-07-14 19:59:36 | brett.cannon | create | |
|