Skip to content

Commit

Permalink
Remove timeout in awaitable (#651)
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein authored Dec 9, 2024
1 parent 1cc0e24 commit 926c7cc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions wgpu/backends/wgpu_native/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,11 @@ class WgpuAwaitable:
truely async manner, as well as to support a synchronous version of them.
"""

def __init__(self, title, callback, finalizer, poll_function=None, timeout=5.0):
def __init__(self, title, callback, finalizer, poll_function=None):
self.title = title # for context in error messages
self.callback = callback # only used to prevent it from being gc'd
self.finalizer = finalizer # function to finish the result
self.poll_function = poll_function # call this to poll wgpu
self.maxtime = time.perf_counter() + float(timeout)
self.result = None

def set_result(self, result):
Expand All @@ -258,7 +257,7 @@ def set_error(self, error):

def _is_done(self):
self.poll_function()
return self.result is not None or time.perf_counter() > self.maxtime
return self.result is not None

def _finish(self):
try:
Expand Down

0 comments on commit 926c7cc

Please sign in to comment.