We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
importlib.reload()
1 parent 283b050 commit 2d580d3Copy full SHA for 2d580d3
Doc/library/importlib.rst
@@ -206,6 +206,10 @@ Functions
206
:exc:`ModuleNotFoundError` is raised when the module being reloaded lacks
207
a :class:`~importlib.machinery.ModuleSpec`.
208
209
+ .. warning::
210
+ This function is not thread-safe. Calling it from multiple threads can result
211
+ in unexpected behavior. It's recommended to use the :class:`threading.Lock`
212
+ or other synchronization primitives for thread-safe module reloading.
213
214
:mod:`importlib.abc` -- Abstract base classes related to import
215
---------------------------------------------------------------
0 commit comments