diff options
author | Alice Ryhl <alice@ryhl.io> | 2020-11-03 00:30:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-02 15:30:07 -0800 |
commit | 20a2b9e26316e704d16c62a28dfb74a505b92b25 (patch) | |
tree | e079440872af05deb22716e221aca85b4be3f8b6 /tokio/src/runtime/blocking/pool.rs | |
parent | ae4e8d7ad1afbfb1a5e8a60a307a7981b6f508dc (diff) |
rt: add missing Send bound (#3089)
Diffstat (limited to 'tokio/src/runtime/blocking/pool.rs')
-rw-r--r-- | tokio/src/runtime/blocking/pool.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tokio/src/runtime/blocking/pool.rs b/tokio/src/runtime/blocking/pool.rs index 2967a109..6b9fb1bf 100644 --- a/tokio/src/runtime/blocking/pool.rs +++ b/tokio/src/runtime/blocking/pool.rs @@ -70,6 +70,7 @@ const KEEP_ALIVE: Duration = Duration::from_secs(10); pub(crate) fn spawn_blocking<F, R>(func: F) -> JoinHandle<R> where F: FnOnce() -> R + Send + 'static, + R: Send + 'static, { let rt = context::current().expect("not currently running on the Tokio runtime."); rt.spawn_blocking(func) @@ -79,6 +80,7 @@ where 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("not currently running on the Tokio runtime."); |