aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/blocking/pool.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/blocking/pool.rs')
-rw-r--r--src/runtime/blocking/pool.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/runtime/blocking/pool.rs b/src/runtime/blocking/pool.rs
index 5c9b8ed..b7d7251 100644
--- a/src/runtime/blocking/pool.rs
+++ b/src/runtime/blocking/pool.rs
@@ -4,7 +4,6 @@ use crate::loom::sync::{Arc, Condvar, Mutex};
use crate::loom::thread;
use crate::runtime::blocking::schedule::NoopSchedule;
use crate::runtime::blocking::shutdown;
-use crate::runtime::blocking::task::BlockingTask;
use crate::runtime::builder::ThreadNameFn;
use crate::runtime::context;
use crate::runtime::task::{self, JoinHandle};
@@ -86,18 +85,6 @@ where
rt.spawn_blocking(func)
}
-#[allow(dead_code)]
-pub(crate) fn try_spawn_blocking<F, R>(func: F) -> Result<(), ()>
-where
- F: FnOnce() -> R + Send + 'static,
- R: Send + 'static,
-{
- let rt = context::current().expect(CONTEXT_MISSING_ERROR);
-
- let (task, _handle) = task::joinable(BlockingTask::new(func));
- rt.blocking_spawner.spawn(task, &rt)
-}
-
// ===== impl BlockingPool =====
impl BlockingPool {