[issue9260] A finer grained import lock
report at bugs.python.org
Wed Jul 14 21:12:31 CEST 2010
Brett Cannon <brett at python.org> 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. Now if someone decides to call load_module on their own, that's there business, but they should be aware of what could happen if they do that without acquiring the lock themselves. Otherwise we just make sure to provide a context manager that takes the name of the module and people can use that when they make their call to loader.load_module.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list