You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Update version from 1.8.1 to 2.0.0 in app.src and docs
- Add changelog entries for ensure_venv/2,3 and dup_fd/1
- Rewrite context-affinity.md for new py_context_router API
- Fix asyncio.md to remove erlang_asyncio references
- Update migration.md with correct function mappings
- Add Virtual Environments section to getting-started.md
- Fix web-frameworks.md to use asyncio.sleep()
|`ErlangEventLoop`| Python asyncio event loop using Erlang for I/O and timers |
71
71
|`py_event_worker`| Erlang gen_server managing FDs and timers for a Python context |
72
72
|`py_event_router`| Routes timer/FD events to the correct event loop instance |
73
-
|`erlang_asyncio`|High-level asyncio-compatible API with direct Erlang integration|
73
+
|`erlang.run()`|Entry point to run asyncio code with the Erlang event loop|
74
74
75
75
## Usage Patterns
76
76
@@ -620,34 +620,32 @@ A shared router process handles timer and FD events for all loops:
620
620
621
621
Each loop has its own pending queue, ensuring callbacks are processed only by the loop that scheduled them. The shared router dispatches timer and FD events to the correct loop based on the capsule backref.
622
622
623
-
## Erlang Asyncio Primitives
623
+
## Erlang Timer Integration
624
624
625
-
> **Note:** The `erlang_asyncio` module has been unified into the main `erlang` module. Use `import erlang` and `erlang.run()` instead.
626
-
627
-
The `erlang` module provides asyncio-compatible primitives that use Erlang's native scheduler for maximum performance. This is the recommended way to use async/await patterns when you need explicit Erlang timer integration.
625
+
When using `erlang.run()` to execute asyncio code, standard asyncio functions like `asyncio.sleep()` are automatically backed by Erlang's native timer system for maximum performance.
628
626
629
627
### Overview
630
628
631
-
Unlike the standard `asyncio` module which uses Python's polling-based event loop, the `erlang` module uses Erlang's`erlang:send_after/3` for timers and integrates directly with the BEAM scheduler. This eliminates Python event loop overhead (~0.5-1ms per operation) and provides more precise timing.
629
+
Unlike Python's standard polling-based event loop, the Erlang event loop uses`erlang:send_after/3` for timers and integrates directly with the BEAM scheduler. This eliminates Python event loop overhead (~0.5-1ms per operation) and provides more precise timing.
0 commit comments