rust-scheduled-executor icon indicating copy to clipboard operation
rust-scheduled-executor copied to clipboard

Non-Send tasks

Open dbrgn opened this issue 8 years ago • 0 comments

I have a use case where the exact timing of a task is not that important, but where I already have a main loop that could do manual polling on the scheduler. The fact that the closure with the task needs to be Send adds quite some boilerplate though (Arc<Mutex<...>> and all the corresponding locking code).

As far as I've seen, the CoreExecutor is based on wakeup timers, right? How hard would it be to add a LocalExecutor with the same scheduling concept as the CoreExecutor, but where the user has to manually poll / query the executor in regular intervals?

dbrgn avatar Oct 15 '17 21:10 dbrgn