mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-21 00:00:10 +02:00
Threadpool blocking (#317)
This patch adds a `blocking` to `tokio-threadpool`. This function serves as a way to annotate sections of code that will perform blocking operations. This informs the thread pool that an additional thread needs to be spawned to replace the current thread, which will no longer be able to process the work queue.
This commit is contained in:
@@ -13,7 +13,7 @@ pub(crate) struct Queue {
|
||||
/// This is a strong reference to `Task` (i.e, `Arc<Task>`)
|
||||
head: AtomicPtr<Task>,
|
||||
|
||||
/// Tail pointer. This is `Arc<Task>`.
|
||||
/// Tail pointer. This is `Arc<Task>` unless it points to `stub`.
|
||||
tail: UnsafeCell<*mut Task>,
|
||||
|
||||
/// Stub pointer, used as part of the intrusive mpsc channel algorithm
|
||||
|
||||
Reference in New Issue
Block a user