Skip to content

Commit 7c7cd56

Browse files
committed
refactor(executor): make AsyncTask Send
1 parent f179610 commit 7c7cd56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/executor/task.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ impl AsyncTaskId {
2525

2626
pub(crate) struct AsyncTask {
2727
id: AsyncTaskId,
28-
future: Pin<Box<dyn Future<Output = ()>>>,
28+
future: Pin<Box<dyn Future<Output = ()> + Send>>,
2929
}
3030

3131
impl AsyncTask {
32-
pub fn new(future: impl Future<Output = ()> + 'static) -> AsyncTask {
32+
pub fn new(future: impl Future<Output = ()> + Send + 'static) -> AsyncTask {
3333
AsyncTask {
3434
id: AsyncTaskId::new(),
3535
future: Box::pin(future),

0 commit comments

Comments
 (0)