From 5ccc6036e42968c69f57202e211771b4c18189d8 Mon Sep 17 00:00:00 2001 From: Almar Klein Date: Mon, 9 Dec 2024 13:12:53 +0100 Subject: [PATCH] Remove timeout in awaitable --- wgpu/backends/wgpu_native/_helpers.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wgpu/backends/wgpu_native/_helpers.py b/wgpu/backends/wgpu_native/_helpers.py index 2dfc8ba1..6a77fc32 100644 --- a/wgpu/backends/wgpu_native/_helpers.py +++ b/wgpu/backends/wgpu_native/_helpers.py @@ -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): @@ -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: