← Questions
Thread-safe scheduler for periodic jobs
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Write a scheduler that runs functions periodically, at a frequency such as 50 Hz, with schedule and cancel. One thread runs the jobs while other threads may add or cancel them at any time, and the code has to actually run, not just be traced by hand. Handle timing drift and cancellation of a job that is about to run.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
