def METHOD_NAME(self, dispatcher):
    task1 = DummyTask()
    task2 = DummyTask()
    scheduler, thread = self.create_and_start(dispatcher)
    scheduler.schedule(task2.invoke, period=0.5)
    stask = scheduler.schedule(task1.invoke, period=0.5)
    scheduler.schedule(stask.cancel, start=time.time() + 0.75)
    scheduler.schedule(scheduler.close, start=time.time() + 1.5)
    thread.join(5)
    assert len(task1.invocations) == 2
    assert len(task2.invocations) == 4