We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 254b630 commit 8e7ddc9Copy full SHA for 8e7ddc9
pubsub/src/manager.rs
@@ -34,7 +34,7 @@ use rand::distributions::Alphanumeric;
34
use rand::{thread_rng, Rng};
35
36
/// Cloneable `Spawn` handle.
37
-pub type TaskExecutor = Arc<dyn futures::task::Spawn>;
+pub type TaskExecutor = Arc<dyn futures::task::Spawn + Send + Sync>;
38
39
type ActiveSubscriptions = Arc<Mutex<HashMap<SubscriptionId, oneshot::Sender<()>>>>;
40
@@ -360,4 +360,11 @@ mod tests {
360
361
assert!(is_not_cancelled);
362
}
363
+
364
+ #[test]
365
+ fn is_send_sync() {
366
+ fn send_sync<T: Send + Sync>() {}
367
368
+ send_sync::<SubscriptionManager>();
369
+ }
370
0 commit comments