From ec8e99cf44f79ad58d2d9bd578a74e714e038fc4 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 22 Oct 2022 00:55:04 +0200 Subject: [PATCH] Require AsyncExecutor tasks to be Send --- src/async_executor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/async_executor.rs b/src/async_executor.rs index 0cfcca28..891fb60f 100644 --- a/src/async_executor.rs +++ b/src/async_executor.rs @@ -8,7 +8,7 @@ pub trait AsyncExecutor: Send + Sync { /// The type of task this executor can execute. This is usually an enum type. The task type /// should not contain any heap allocated data like [`Vec`]s and [`Box`]es. - type Task; + type Task: Send; /// Run `task` on the current thread. This is usually called from the operating system's main /// thread or a similar thread.