clockblocks.clock.tempo_modification

clockblocks.clock.tempo_modification(fn)[source]

Decorator applied to methods of Clock that alter tempo. While there’s no issue if a clock’s tempo is altered from its own thread, or even from the thread of a child clock, there would be an issue if it were to happen on a parent clock. (This is because the parent clock will have already ceded control to the child, and the child will have already scheduled its wakeup call, which may now be changing due to the tempo change.) This is also needed when tempo is changed from a non-clock thread.