You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in the show_editor() Example it should be thread.start() not thread.run().
The Example:
importpedalboardfromthreadingimportEvent, Threadplugin=pedalboard.load_plugin("../path-to-my-plugin-file")
close_window_event=Event()
defother_thread():
# do something to determine when to close the windowifshould_close_window:
close_window_event.set()
thread=Thread(target=other_thread)
thread.run()
# This will block until the other thread calls .set():plugin.show_editor(close_window_event)
Corrected:
importpedalboardfromthreadingimportEvent, Threadplugin=pedalboard.load_plugin("../path-to-my-plugin-file")
close_window_event=Event()
defother_thread():
# do something to determine when to close the windowifshould_close_window:
close_window_event.set()
thread=Thread(target=other_thread)
thread.start()
# This will block until the other thread calls .set():plugin.show_editor(close_window_event)
The run() method is the entry point for the thread's activity, but calling it directly won't start the thread in a separate execution context.
The text was updated successfully, but these errors were encountered:
dschiller
changed the title
Bug on Thread Example
Bug on Thread Example for show_editor()May 2, 2024
On page
https://spotify.github.io/pedalboard/reference/pedalboard.html#pedalboard.AudioUnitPlugin.show_editor
in the
show_editor()
Example it should bethread.start()
notthread.run()
.The Example:
Corrected:
The
run()
method is the entry point for the thread's activity, but calling it directly won't start the thread in a separate execution context.The text was updated successfully, but these errors were encountered: