The fate of select!(), Select, and Handle

What should we do about select!(), Select, and Handle?

Select and Handle are currently labelled as unstable due to:

This implementation, while likely sufficient, is unsafe and likely to be error prone. At some point in the future this module will likely be replaced, and it is currently unknown how much API breakage that will cause. The ability to select over a number of channels will remain forever, but no guarantees beyond this are being made

I believe it should be possible to implement Handle::add() and Handle::remove() as safe functions, yet they are unsafe.

Additionally, it is currently impossible to use the same Receiver both for getting data in select!() and for other purposes inside select!(). (The macro shadows it with a Handle)

This implementation also transmutes &T into &mut T, which is probably undefined behavior.

Is anybody working on fixing this?

1 Like

Iā€™m interested in this as well. Are there any plans to stabilize/improve Select and Handle?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.