From 8025a77067d29dd9949a19b05196d1b666440527 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 13 Jan 2015 10:55:55 -0800 Subject: [PATCH] Mention ChanReader/ChanWriter will be unstable --- text/0517-io-os-reform.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/text/0517-io-os-reform.md b/text/0517-io-os-reform.md index 38dc3973085..5fce9eab6f5 100644 --- a/text/0517-io-os-reform.md +++ b/text/0517-io-os-reform.md @@ -858,7 +858,23 @@ namespaced. #### Channel adapters [Channel adapters]: #channel-adapters -The `ChanReader` and `ChanWriter` adapters will be kept exactly as they are today. +The `ChanReader` and `ChanWriter` adapters will be left as they are today, and +they will remain `#[unstable]`. The channel adapters currently suffer from a few +problems today, some of which are inherent to the design: + +* Construction is somewhat unergonomic. First a `mpsc` channel pair must be + created and then each half of the reader/writer needs to be created. +* Each call to `write` involves moving memory onto the heap to be sent, which + isn't necessarily efficient. +* The design of `std::sync::mpsc` allows for growing more channels in the + future, but it's unclear if we'll want to continue to provide a reader/writer + adapter for each channel we add to `std::sync`. + +These types generally feel as if they're from a different era of Rust (which +they are!) and may take some time to fit into the current standard library. They +can be reconsidered for stabilization after the dust settles from the I/O +redesign as well as the recent `std::sync` redesign. At this time, however, this +RFC recommends they remain unstable. #### `stdin`, `stdout`, `stderr` [stdin, stdout, stderr]: #stdin-stdout-stderr