mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-29 15:03:22 +00:00
Use FnOnce() + Send
as task func
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
6a865062e6
commit
2cf4aebe7a
@ -149,7 +149,7 @@ impl TaskOptions {
|
||||
/// Creates a set of options for a task.
|
||||
pub fn new<F>(func: F) -> Self
|
||||
where
|
||||
F: FnOnce() + Send + Sync + 'static,
|
||||
F: FnOnce() + Send + 'static,
|
||||
{
|
||||
Self {
|
||||
func: Some(Box::new(func)),
|
||||
|
Reference in New Issue
Block a user