@@ -60,6 +60,7 @@ use crate::sync::WakerSet;
6060/// ```
6161#[ cfg( feature = "unstable" ) ]
6262#[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
63+ #[ deprecated = "new channel api at async_std::channel" ]
6364pub fn channel < T > ( cap : usize ) -> ( Sender < T > , Receiver < T > ) {
6465 let channel = Arc :: new ( Channel :: with_capacity ( cap) ) ;
6566 let s = Sender {
@@ -102,6 +103,7 @@ pub fn channel<T>(cap: usize) -> (Sender<T>, Receiver<T>) {
102103/// ```
103104#[ cfg( feature = "unstable" ) ]
104105#[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
106+ #[ deprecated = "new channel api at async_std::channel" ]
105107pub struct Sender < T > {
106108 /// The inner channel.
107109 channel : Arc < Channel < T > > ,
@@ -363,6 +365,7 @@ impl<T> fmt::Debug for Sender<T> {
363365/// ```
364366#[ cfg( feature = "unstable" ) ]
365367#[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
368+ #[ deprecated = "new channel api at async_std::channel" ]
366369pub struct Receiver < T > {
367370 /// The inner channel.
368371 channel : Arc < Channel < T > > ,
@@ -993,6 +996,7 @@ impl<T> Drop for Channel<T> {
993996#[ cfg( feature = "unstable" ) ]
994997#[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
995998#[ derive( PartialEq , Eq ) ]
999+ #[ deprecated = "new channel api at async_std::channel" ]
9961000pub enum TrySendError < T > {
9971001 /// The channel is full but not disconnected.
9981002 Full ( T ) ,
@@ -1025,6 +1029,7 @@ impl<T> Display for TrySendError<T> {
10251029#[ cfg( feature = "unstable" ) ]
10261030#[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
10271031#[ derive( Debug , PartialEq , Eq ) ]
1032+ #[ deprecated = "new channel api at async_std::channel" ]
10281033pub enum TryRecvError {
10291034 /// The channel is empty but not disconnected.
10301035 Empty ,
@@ -1048,6 +1053,7 @@ impl Display for TryRecvError {
10481053#[ cfg( feature = "unstable" ) ]
10491054#[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
10501055#[ derive( Debug , PartialEq , Eq ) ]
1056+ #[ deprecated = "new channel api at async_std::channel" ]
10511057pub struct RecvError ;
10521058
10531059impl Error for RecvError { }
0 commit comments