Skip to content

Commit 14db1be

Browse files
committed
Make AsyncRuntime Fn Send + 'static
Signed-off-by: Tim Peters (HE/HIM) (from Dev Box) <timmypeters@microsoft.com>
1 parent b95c7fa commit 14db1be

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/core/src/pattern/asynk.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,6 @@ pub trait AsyncRuntime {
104104

105105
fn spawn<Fn, F>(&self, f: Fn)
106106
where
107-
Fn: FnOnce(Self::T) -> F,
107+
Fn: FnOnce(Self::T) -> F + Send + 'static,
108108
F: Future<Output = ()> + Send + 'static;
109109
}

crates/proc_macros/src/runtime/emit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl RuntimeModel {
2525

2626
fn spawn<Fn, F>(&self, f: Fn)
2727
where
28-
Fn: FnOnce(Self::T) -> F,
28+
Fn: FnOnce(Self::T) -> F + Send + 'static,
2929
F: ::std::future::Future<Output = ()> + Send + 'static,
3030
{
3131
self.#forward_field.spawn(f)

0 commit comments

Comments
 (0)