docs(python): add docs about threading (#8829)

Co-authored-by: Max Schmitt <max@schmitt.mx>
This commit is contained in:
Kumar Aditya 2021-09-27 15:52:16 +05:30 committed by GitHub
parent 83910a9469
commit 3394bec364
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,6 +189,11 @@ Playwright runs the driver in a subprocess, so it requires `ProactorEventLoop` o
On Windows Python 3.7, Playwright sets the default event loop to `ProactorEventLoop` as it is default on Python 3.8+. On Windows Python 3.7, Playwright sets the default event loop to `ProactorEventLoop` as it is default on Python 3.8+.
### Threading
Playwright's API is not thread-safe. If you are using Playwright in a multi-threaded environment, you should create a playwright instance per thread. See [threading issue](https://github.com/microsoft/playwright-python/issues/623) for more details.
## System requirements ## System requirements
Playwright requires Python 3.7 or above. The browser binaries for Chromium, Playwright requires Python 3.7 or above. The browser binaries for Chromium,