Skip to content

Commit 4d9d536

Browse files
committed
sync_close
1 parent f049717 commit 4d9d536

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

PlaywrightSafeThread/browser/threadsafe_browser.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,14 @@ async def __stop_playwright(self) -> None:
365365
await self.playwright.stop()
366366
except:
367367
pass
368+
368369
async def close(self):
369370
await self.__stop_playwright()
370371
self.stop()
371372

372373
def sync_close(self):
373-
self.run_threadsafe(self.close)
374+
self.run_threadsafe(self.__stop_playwright)
375+
self.stop()
374376

375377
def run_threadsafe(self, func, *args, timeout=120, **kwargs):
376378
future = asyncio.run_coroutine_threadsafe(

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
long_description = open("README.md", encoding="utf-8").read()
55
description = "PlaywrightSafeThread"
66

7-
version = "0.4.4"
7+
version = "0.4.5"
88

99
setup(
1010
name="PlaywrightSafeThread",

0 commit comments

Comments
 (0)