SingleThreadedScheduler impl and tests