@@ -60,6 +60,7 @@ use crate::sync::WakerSet;
60
60
/// ```
61
61
#[ cfg( feature = "unstable" ) ]
62
62
#[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
63
+ #[ deprecated = "new channel api at async_std::channel" ]
63
64
pub fn channel < T > ( cap : usize ) -> ( Sender < T > , Receiver < T > ) {
64
65
let channel = Arc :: new ( Channel :: with_capacity ( cap) ) ;
65
66
let s = Sender {
@@ -102,6 +103,7 @@ pub fn channel<T>(cap: usize) -> (Sender<T>, Receiver<T>) {
102
103
/// ```
103
104
#[ cfg( feature = "unstable" ) ]
104
105
#[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
106
+ #[ deprecated = "new channel api at async_std::channel" ]
105
107
pub struct Sender < T > {
106
108
/// The inner channel.
107
109
channel : Arc < Channel < T > > ,
@@ -363,6 +365,7 @@ impl<T> fmt::Debug for Sender<T> {
363
365
/// ```
364
366
#[ cfg( feature = "unstable" ) ]
365
367
#[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
368
+ #[ deprecated = "new channel api at async_std::channel" ]
366
369
pub struct Receiver < T > {
367
370
/// The inner channel.
368
371
channel : Arc < Channel < T > > ,
@@ -993,6 +996,7 @@ impl<T> Drop for Channel<T> {
993
996
#[ cfg( feature = "unstable" ) ]
994
997
#[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
995
998
#[ derive( PartialEq , Eq ) ]
999
+ #[ deprecated = "new channel api at async_std::channel" ]
996
1000
pub enum TrySendError < T > {
997
1001
/// The channel is full but not disconnected.
998
1002
Full ( T ) ,
@@ -1025,6 +1029,7 @@ impl<T> Display for TrySendError<T> {
1025
1029
#[ cfg( feature = "unstable" ) ]
1026
1030
#[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
1027
1031
#[ derive( Debug , PartialEq , Eq ) ]
1032
+ #[ deprecated = "new channel api at async_std::channel" ]
1028
1033
pub enum TryRecvError {
1029
1034
/// The channel is empty but not disconnected.
1030
1035
Empty ,
@@ -1048,6 +1053,7 @@ impl Display for TryRecvError {
1048
1053
#[ cfg( feature = "unstable" ) ]
1049
1054
#[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
1050
1055
#[ derive( Debug , PartialEq , Eq ) ]
1056
+ #[ deprecated = "new channel api at async_std::channel" ]
1051
1057
pub struct RecvError ;
1052
1058
1053
1059
impl Error for RecvError { }
0 commit comments