Skip to content

Commit

Permalink
undo the undoing of an earlier change
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein committed Oct 6, 2023
1 parent 115d538 commit 3364486
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions wgpu/gui/offscreen.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ def draw(self):

def call_later(delay, callback, *args):
loop = asyncio.get_event_loop_policy().get_event_loop()
# for the offscreen canvas, we prevent new frames and callbacks
# from being queued while the loop is running. this avoids
# callbacks from one visualization leaking into the next.
if loop.is_running():
return
loop.call_later(delay, callback, *args)


Expand Down

0 comments on commit 3364486

Please sign in to comment.