Use wait/notify instead of a Semaphore to allow calling thread to be re-scheduled if necessary. Won't make any difference to repeats executed in the main thread, but if they are in a background thread it should be more fair to other tasks.
Use wait/notify instead of a Semaphore to allow calling thread to be re-scheduled if necessary. Won't make any difference to repeats executed in the main thread, but if they are in a background thread it should be more fair to other tasks.