mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-27 00:00:12 +02:00
rt: add Handle::spawn_blocking method (#2501)
This follows a similar pattern to `Handle::spawn` to add the blocking spawn capabilities to `Handle`.
This commit is contained in:
@@ -148,7 +148,7 @@ impl fmt::Debug for BlockingPool {
|
||||
// ===== impl Spawner =====
|
||||
|
||||
impl Spawner {
|
||||
fn spawn(&self, task: Task, rt: &Handle) -> Result<(), ()> {
|
||||
pub(crate) fn spawn(&self, task: Task, rt: &Handle) -> Result<(), ()> {
|
||||
let shutdown_tx = {
|
||||
let mut shared = self.inner.shared.lock().unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user