]> git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/blobdiff - music_sampler/actions/wait.py
Make 'interrupt_wait' able to interrupt all waits
[perso/Immae/Projets/Python/MusicSampler.git] / music_sampler / actions / wait.py
index e6d07f24de9d2b042f149b73ae6966c31de404a7..bcee64941cc93c160b0673612146c2740abecc9a 100644 (file)
@@ -1,8 +1,7 @@
 import threading
 
 def run(action, duration=0, music=None, set_wait_id=None, **kwargs):
-    if set_wait_id is not None:
-        action.mapping.add_wait_id(set_wait_id, action)
+    action.mapping.add_wait(action, wait_id=set_wait_id)
 
     action.sleep_event = threading.Event()
     action.sleep_event_timer = threading.Timer(