Photo by Agathe on Unsplash
Read More

Python Concurrency

在 Python 中,Process、Thread 與 Async 是三種不同的並發(concurrent)機制,但它們的行為與適用情境經常被混淆。特別是在使用 FastAPI 時,若沒有理解其底層執行方式,容易寫出會阻塞(blocking)系統的程式。本文從這些基礎概念出發,整理 Python 在並發與實務應用上的行為。
Read More