Skip to content

Commit 72a7cf4

Browse files
authored
change Fn to FnMut in add_periodic_task_to_core (#134)
1 parent 44771ea commit 72a7cf4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/runtime/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,11 +434,11 @@ impl Runtime {
434434
pub fn add_periodic_task_to_core<F>(
435435
&mut self,
436436
core: usize,
437-
task: F,
437+
mut task: F,
438438
dur: Duration,
439439
) -> Result<&mut Self>
440440
where
441-
F: Fn() + Send + Sync + 'static,
441+
F: FnMut() + Send + Sync + 'static,
442442
{
443443
let core_id = CoreId::new(core);
444444
let thread = &self.get_core(core_id)?.thread;

0 commit comments

Comments
 (0)