Skip to content

Conversation

@kammce
Copy link
Member

@kammce kammce commented Jan 13, 2026

The PR Resolves #16 "Add blocked_by::external to support future coro compatibility." We implement this state by redefining its semantics. The blocking states previously had the semantic that all states are poll-able except for time and external. Now, blocked_by::external is poll-able. The semantics for external is that a coroutines that invoke a third party coroutine must supervise that coroutine. They are now supervisors meaning that they stay as the active coroutine for their context (proxy or otherwise).

This summoned a new question about the viability of sync_wait. If time blocking is not poll-able then sync wait cannot be used as it does not have a means to schedule the coroutine some duration into the future.

This change introduces basic_context which provides its own sync_wait function that takes a callable that delays execution until the requested time delay has elapsed.

The PR Resolves #16 "Add `blocked_by::external` to support future coro
compatibility." We implement this state by redefining its semantics. The
blocking states previously had the semantic that all states are
poll-able except for time and external. Now, `blocked_by::external`
is poll-able. The semantics for external is that a coroutines that
invoke a third party coroutine must supervise that coroutine. They are
now supervisors meaning that they stay as the active coroutine for their
context (proxy or otherwise).

This summoned a new question about the viability of sync_wait. If
time blocking is not poll-able then sync wait cannot be used as it does
not have a means to schedule the coroutine some duration into the
future.

This change introduces basic_context which provides its own sync_wait
function that takes a callable that delays execution until the requested
time delay has elapsed.
@kammce kammce merged commit 8ae8bba into main Jan 13, 2026
5 checks passed
@kammce kammce deleted the remove-sync-wait branch January 13, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add blocked_by::external to support future coro compatibility

2 participants