瀏覽代碼

Add a warning about creating threads at runtime

skyace65 3 年之前
父節點
當前提交
f7ac05e7e9
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      tutorials/performance/using_multiple_threads.rst

+ 6 - 0
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()<class_Thread_method_wait_to_finish>`, which will
 :ref:`Thread.wait_to_finish()<class_Thread_method_wait_to_finish>`, which will
 wait until the thread is done (if not done yet), then properly dispose of it.
 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
 Mutexes
 -------
 -------