Skip to content

Conversation

@zach-schoenberger
Copy link
Contributor

This is a draft proposal for implementing a blocking Select API.

adding tests

saving state

recv tweak

state save

closer to correct flow

fixed missing disconnect check

cleanup

cleanup

adding ALL support

fixes and cleanup

adding more unit tests and fixing bugs

saving state

fix

tweaks

cleanup

benches working

adding disconnect state

making idx handle better

builder pattern

adding better return type

fixing comments

cleanup

fixing issues

fixing bugs

reorg

everything working

removing file

cleaning up benches

file rename

select benchmarks

fixing send logic

fixing select tx

select benchmarks working as expected
@zhuxiujia
Copy link

Adding select may result in reduced performance

@frostyplanet
Copy link
Owner

frostyplanet commented Nov 20, 2025

Adding select may result in reduced performance

Of course.

This is a draft proposal by zach, which we have discussed on discord. And the proposal does not cover selecting different types of msg. So I might leave it for future reference (and more cases need to be collected )

@frostyplanet
Copy link
Owner

frostyplanet commented Dec 28, 2025

although it might have some state flaws might lead to deadlock as I fear, I have run zach's version of benchmark, it has only 1/3 performance compared to crossbeam's select,

crossbeam_select/select_mpsc_4_channels/4
                        time:   [72.733 ms 72.919 ms 73.092 ms]
                        thrpt:  [13.681 Melem/s 13.714 Melem/s 13.749 Melem/s]

select_bounded_recv_select_capacities/mpmc_unbiased_first_ready/100
                        time:   [202.06 ms 204.99 ms 206.79 ms]
                        thrpt:  [4.8359 Melem/s 4.8782 Melem/s 4.9489 Melem/s]

I might have a different way of implementation in the future,

@frostyplanet frostyplanet force-pushed the master branch 10 times, most recently from 7e54695 to 94ba102 Compare January 10, 2026 16:15
@frostyplanet
Copy link
Owner

select & Multiplex already implemented in the dev branch

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.

3 participants