We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a42af06 commit 15bac4fCopy full SHA for 15bac4f
std/src/thread/spawnhook.rs
@@ -24,7 +24,7 @@ impl Drop for SpawnHooks {
24
}
25
26
struct SpawnHook {
27
- hook: Box<dyn Sync + Fn(&Thread) -> Box<dyn Send + FnOnce()>>,
+ hook: Box<dyn Send + Sync + Fn(&Thread) -> Box<dyn Send + FnOnce()>>,
28
next: Option<Arc<SpawnHook>>,
29
30
@@ -86,7 +86,7 @@ struct SpawnHook {
86
#[unstable(feature = "thread_spawn_hook", issue = "none")]
87
pub fn add_spawn_hook<F, G>(hook: F)
88
where
89
- F: 'static + Sync + Fn(&Thread) -> G,
+ F: 'static + Send + Sync + Fn(&Thread) -> G,
90
G: 'static + Send + FnOnce(),
91
{
92
SPAWN_HOOKS.with(|h| {
0 commit comments