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 brett.cannon
Recipients belopolsky, brett.cannon, christian.heimes, grahamd, gvanrossum, ncoghlan, pitrou
Date 2010-07-14.19:59:35
SpamBayes Score 1.488848e-05
Marked as misclassified No
Message-id <AANLkTimY91VkA4vpET-1KEgmz6HG2Q17P61-bi9j5n1H@mail.gmail.com>
In-reply-to <1279136070.3128.11.camel@localhost.localdomain>
Content
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.
Files
File name Uploaded
unnamed brett.cannon, 2010-07-14.19:59:35
History
Date User Action Args
2010-07-14 19:59:37brett.cannonsetrecipients: + brett.cannon, gvanrossum, ncoghlan, belopolsky, pitrou, christian.heimes, grahamd
2010-07-14 19:59:36brett.cannonlinkissue9260 messages
2010-07-14 19:59:36brett.cannoncreate