From f7ac05e7e9c7675d2335e3801b227b2e97348581 Mon Sep 17 00:00:00 2001 From: skyace65 Date: Sun, 26 Dec 2021 12:35:16 -0500 Subject: [PATCH] Add a warning about creating threads at runtime --- tutorials/performance/using_multiple_threads.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tutorials/performance/using_multiple_threads.rst b/tutorials/performance/using_multiple_threads.rst index 1c14995be..90803a71a 100644 --- a/tutorials/performance/using_multiple_threads.rst +++ b/tutorials/performance/using_multiple_threads.rst @@ -53,6 +53,12 @@ Even if the function has returned already, the thread must collect it, so call :ref:`Thread.wait_to_finish()`, which will wait until the thread is done (if not done yet), then properly dispose of it. +.. warning:: + + Creating threads at run-time is slow on Windows and should be avoided to + prevent stuttering. Semaphores, explained later on this page, should be used + instead. + Mutexes -------