Skip to content

Commit 97c8935

Browse files
committedJan 13, 2015
Merge pull request #1 from alexcrichton/pr-1
Mention ChanReader/ChanWriter will be unstable
2 parents 9197039 + 8025a77 commit 97c8935

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed
 

‎text/0517-io-os-reform.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,23 @@ namespaced.
858858
#### Channel adapters
859859
[Channel adapters]: #channel-adapters
860860

861-
The `ChanReader` and `ChanWriter` adapters will be kept exactly as they are today.
861+
The `ChanReader` and `ChanWriter` adapters will be left as they are today, and
862+
they will remain `#[unstable]`. The channel adapters currently suffer from a few
863+
problems today, some of which are inherent to the design:
864+
865+
* Construction is somewhat unergonomic. First a `mpsc` channel pair must be
866+
created and then each half of the reader/writer needs to be created.
867+
* Each call to `write` involves moving memory onto the heap to be sent, which
868+
isn't necessarily efficient.
869+
* The design of `std::sync::mpsc` allows for growing more channels in the
870+
future, but it's unclear if we'll want to continue to provide a reader/writer
871+
adapter for each channel we add to `std::sync`.
872+
873+
These types generally feel as if they're from a different era of Rust (which
874+
they are!) and may take some time to fit into the current standard library. They
875+
can be reconsidered for stabilization after the dust settles from the I/O
876+
redesign as well as the recent `std::sync` redesign. At this time, however, this
877+
RFC recommends they remain unstable.
862878

863879
#### `stdin`, `stdout`, `stderr`
864880
[stdin, stdout, stderr]: #stdin-stdout-stderr

0 commit comments

Comments
 (0)
Please sign in to comment.