Python threading event objects 溝通範例教學
The simplest mechanisms for communication between threads: one thread signals an event and other threads wait for it.
Threads(執行緒)之間溝通最簡單的方式,即是透過 Event Objects ,這種方式通常應用在 1 個 thread 發起 1 個 event ,然後其他 threads 會等待發出 event 的 thread ,譬如 1 個發號施令的 thread ,其他 threads 會等待該 thread 發號施令後才開始工作。
Last updated on Jul 24, 2023 in Python 程式設計 - 中階 by Amo Chen ‐ 2 min read