We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1950ad8 commit fe5e04aCopy full SHA for fe5e04a
src/dispatch/function.py
@@ -67,10 +67,7 @@ def __init__(
67
self._primitive_func = primitive_func
68
# FIXME: is there a way to decorate the function at the definition
69
# without making it a class method?
70
- if coroutine:
71
- self._func = durable(self._call_async)
72
- else:
73
- self._func = func
+ self._func = durable(self._call_async) if coroutine else func
74
75
def __call__(self, *args, **kwargs):
76
return self._func(*args, **kwargs)
0 commit comments