mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
docs: fix broken links of select! (#7860)
Co-authored-by: Martin Grigorov <[email protected]>
This commit is contained in:
co-authored by
Martin Grigorov
parent
27d1383581
commit
bf185b61ff
@@ -579,9 +579,11 @@ where
|
|||||||
/// # Cancel safety
|
/// # Cancel safety
|
||||||
///
|
///
|
||||||
/// This method is cancel safe. If `next_many` is used as the event in a
|
/// This method is cancel safe. If `next_many` is used as the event in a
|
||||||
/// [`tokio::select!`](tokio::select) statement and some other branch
|
/// [`tokio::select!`] statement and some other branch completes first,
|
||||||
/// completes first, it is guaranteed that no items were received on any of
|
/// it is guaranteed that no items were received on any of the underlying
|
||||||
/// the underlying streams.
|
/// streams.
|
||||||
|
///
|
||||||
|
/// [`tokio::select!`]: https://docs.rs/tokio/latest/tokio/macro.select.html
|
||||||
pub async fn next_many(&mut self, buffer: &mut Vec<(K, V::Item)>, limit: usize) -> usize {
|
pub async fn next_many(&mut self, buffer: &mut Vec<(K, V::Item)>, limit: usize) -> usize {
|
||||||
poll_fn(|cx| self.poll_next_many(cx, buffer, limit)).await
|
poll_fn(|cx| self.poll_next_many(cx, buffer, limit)).await
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,13 +88,15 @@ impl Inner {
|
|||||||
/// # Cancellation safety
|
/// # Cancellation safety
|
||||||
///
|
///
|
||||||
/// The `Receiver` is cancel safe. If it is used as the event in a
|
/// The `Receiver` is cancel safe. If it is used as the event in a
|
||||||
/// [`tokio::select!`](macro@tokio::select) statement and some other branch
|
/// [`tokio::select!`] statement and some other branch completes
|
||||||
/// completes first, it is guaranteed that no bytes were received on this
|
/// first, it is guaranteed that no bytes were received on this
|
||||||
/// channel.
|
/// channel.
|
||||||
///
|
///
|
||||||
/// You can still read the remaining data from the buffer
|
/// You can still read the remaining data from the buffer
|
||||||
/// even if the write half has been dropped.
|
/// even if the write half has been dropped.
|
||||||
/// See [`Sender::poll_shutdown`] and [`Sender::drop`] for more details.
|
/// See [`Sender::poll_shutdown`] and [`Sender::drop`] for more details.
|
||||||
|
///
|
||||||
|
/// [`tokio::select!`]: https://docs.rs/tokio/latest/tokio/macro.select.html
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Receiver {
|
pub struct Receiver {
|
||||||
inner: Arc<Mutex<Inner>>,
|
inner: Arc<Mutex<Inner>>,
|
||||||
@@ -163,13 +165,14 @@ impl AsyncRead for Receiver {
|
|||||||
/// # Cancellation safety
|
/// # Cancellation safety
|
||||||
///
|
///
|
||||||
/// The `Sender` is cancel safe. If it is used as the event in a
|
/// The `Sender` is cancel safe. If it is used as the event in a
|
||||||
/// [`tokio::select!`](macro@tokio::select) statement and some other branch
|
/// [`tokio::select!`] statement and some other branch completes
|
||||||
/// completes first, it is guaranteed that no bytes were sent on this
|
/// first, it is guaranteed that no bytes were sent on this channel.
|
||||||
/// channel.
|
|
||||||
///
|
///
|
||||||
/// # Shutdown
|
/// # Shutdown
|
||||||
///
|
///
|
||||||
/// See [`Sender::poll_shutdown`].
|
/// See [`Sender::poll_shutdown`].
|
||||||
|
///
|
||||||
|
/// [`tokio::select!`]: https://docs.rs/tokio/latest/tokio/macro.select.html
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Sender {
|
pub struct Sender {
|
||||||
inner: Arc<Mutex<Inner>>,
|
inner: Arc<Mutex<Inner>>,
|
||||||
|
|||||||
Reference in New Issue
Block a user