Xiang Zhang <zhangyangyu0...@gmail.com> writes: > Just like the title. It seems to me it is needed from the source code but > codes in stdlib all doesn't do that.
The "import" machinery uses locks of its own (to protect "sys.modules"). I assume that "load_module" will use those locks internally. "find" might be considered to usually see quite a static situation; should your file system be modified by concurrent threads, it might be necessary that you use your own locks to protect against this. -- https://mail.python.org/mailman/listinfo/python-list