Thread-safe scheduler for periodic jobs

0
Remix

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.

NuroTechnical phone screenLast asked May 2026
No answer yet. Write the first one; the best answer gets endorsed.