Skip to content

Commit

Permalink
fix spellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathy-bajo committed Jan 26, 2025
1 parent 9cac1e6 commit a12075a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions tokio-util/src/io/sync_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,11 @@ use tokio::io::{
///
/// `SyncIoBridge` allows you to use synchronous I/O operations in an asynchronous
/// context by blocking the current thread. However, this can be inefficient because:
///
/// - **Blocking**: The use of `SyncIoBridge` may block a valuable async runtime
/// thread, which could otherwise be used to handle more tasks concurrently.
///
/// - **Thread Pool Saturation**: If many threads are blocked using `SyncIoBridge`,
/// it can exhaust the async runtime's thread pool, leading to increased latency
/// and reduced throughput.
///
/// - **Lack of Parallelism**: By blocking on synchronous operations, you may miss
/// out on the benefits of running tasks concurrently, especially in I/O-bound
/// operations where async tasks could be interleaved.
Expand Down Expand Up @@ -234,10 +231,8 @@ use tokio::io::{
/// let result = spawn_blocking(move || {
/// // Create an in-memory buffer to hold the copied data.
/// let mut buffer = Vec::new();
///
/// // Copy data from the sync_reader to the buffer.
/// std::io::copy(&mut sync_reader, &mut buffer)?;
///
/// // Return the buffer containing the copied data.
/// Ok::<_, std::io::Error>(buffer)
/// })
Expand Down

0 comments on commit a12075a

Please sign in to comment.