Skip to content

v2.0.0b31

Choose a tag to compare

@bpiwowar bpiwowar released this 03 Feb 07:36
· 201 commits to master since this release
fix: use lazy initialization for asyncio primitives

Creating asyncio primitives eagerly in __init__ using run_coroutine
could cause issues in CI environments where the EventLoopThread might
not be fully responsive during subprocess initialization.

Changed to lazy initialization with double-checked locking:
- Primitives are created on first access within the EventLoopThread
- A threading lock protects concurrent initialization
- The dispatch logic in aio_acquire/aio_release ensures code runs
  in the correct event loop, so primitives are always created there

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>