Skip to content

add non-suspending mux poll() methods - #268

Merged
tzcnt merged 4 commits into
mainfrom
mux_poll
Jul 10, 2026
Merged

tzcnt merged 4 commits into
mainfrom
mux_poll

Conversation

@tzcnt

@tzcnt tzcnt commented Jul 10, 2026 •

Copy link
Copy Markdown
Owner

mux_tuple::poll() and mux_many::poll() allow you to check if a result is ready without suspending. If it is, they return the index of the ready result, which you can then access with operator[] or get<I>(), and it is considered consumed, so you can reuse that slot with fork().

Otherwise it returns end() or a new pending() sentinel which indicates that nothing is currently ready.

Also did a bit of cleanup on the shared header.

@tzcnt tzcnt changed the title add mux poll() methods add non-suspending mux poll() methods Jul 10, 2026
@tzcnt
tzcnt merged commit d2cd471 into main Jul 10, 2026
56 checks passed
@tzcnt
tzcnt deleted the mux_poll branch July 10, 2026 18:57
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.

1 participant