job_scheduler
job_scheduler copied to clipboard
fix `dyn std::ops::FnMut()` cannot be sent between threads safely #20
@lholden can we have this merged and published to crates.io please?
Seconding that @alopatindev - awesome crate, but this PR would make it even more awesome, @lholden! :) Tested it and this fixes it in my case:
thread::spawn(move || {
loop {
schedule.tick();
thread::sleep(std::time::Duration::from_secs(60));
}
});
This PR is implemented in https://crates.io/crates/job_scheduler_ng (with some minor changes).