1
0
mirror of synced 2026-08-04 14:36:55 +00:00

docs: add thread-safety notes

This commit is contained in:
Yury Semikhatsky
2021-01-19 11:38:10 -08:00
committed by GitHub
parent 3b495615c2
commit 6c71f15866
+4
View File
@@ -32,6 +32,10 @@ To run Playwright simply add following dependency to your Maven project:
</dependency>
```
#### Is Playwright thread-safe?
No, Playwright is not thread safe, i.e. all its methods as well as methods on all objects created by it (such as BrowserContext, Browser, Page etc.) are expected to be called on the same thread where Playwright object was created or proper synchronization should be implemented to ensure only one thread calls Playwright methods at any given time. Having said that it's okay to create new many Playwright instances each on its own thread.
## Examples
You can find Maven project with the examples [here](./examples).