homepage

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 brett.cannon, christian.heimes, grahamd, gvanrossum, ncoghlan, pitrou
Date 2010年07月14日.14:44:15
SpamBayes Score 0.0014945148
Marked as misclassified No
Message-id <1279118663.3.0.514954672422.issue9260@psf.upfronthosting.co.za>
In-reply-to
Content
This is an implementation of the idea suggested in:
http://mail.python.org/pipermail/python-dev/2003-February/033445.html
The patch creates a dictionary of reentrant locks keyed by module full name. Trying to import a module or package will first get the lock for that module (or, if necessary, create it) and then acquire it. This is done for any module type.
The global import lock is still there, but only used for two things:
- serializing first time creation of module-specific locks
- protection of imports based on import hooks, since we don't know whether third-party import hooks are themselves thread-safe
Semantics of the public C API are unchanged, because it is not clear whether they should be or not (concerns of usefulness vs. compatibility). For example, PyImport_ImportModuleNoBlock() still uses the global import lock but this could be relaxed in a later patch.
History
Date User Action Args
2010年07月14日 14:44:24pitrousetrecipients: + pitrou, gvanrossum, brett.cannon, ncoghlan, christian.heimes, grahamd
2010年07月14日 14:44:23pitrousetmessageid: <1279118663.3.0.514954672422.issue9260@psf.upfronthosting.co.za>
2010年07月14日 14:44:20pitroulinkissue9260 messages
2010年07月14日 14:44:19pitroucreate

AltStyle によって変換されたページ (->オリジナル) /