We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a7e705 commit 00953d6Copy full SHA for 00953d6
src/oumi/core/async_utils.py
@@ -20,5 +20,5 @@ def safe_asyncio_run(main: Awaitable[T]) -> T:
20
Returns:
21
The result of the awaitable.
22
"""
23
- pool = ThreadPool(processes=1)
24
- return pool.apply(asyncio.run, (main,)) # type: ignore
+ with ThreadPool(processes=1) as pool:
+ return pool.apply(asyncio.run, (main,)) # type: ignore
0 commit comments