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
Is your feature request related to a problem? Please describe.
If we hit WorkflowStub#getResultAsync and after that, we either don't wait on the result at all or wait for a bit and discard after, the long poll continues to run.
This creates a need for an unpleasant, unconventional WorkflowStub#getResultAsync(resultType, timeout).
Why do users need to pass a timeout to getResultAsync if they pass it into Future.get(timeout).
Most users just use WorkflowStub#getResultAsync(resultType) not understanding that they create a leak if the workflows don't finish fast.
Describe the solution you'd like
Instead of that, Temporal Java SDK code should maintain a weak or phantom reference on the CompletableFuture that we return to the users and cancel the background long poll when it's discarded by the user code.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
If we hit WorkflowStub#getResultAsync and after that, we either don't wait on the result at all or wait for a bit and discard after, the long poll continues to run.
This creates a need for an unpleasant, unconventional
WorkflowStub#getResultAsync(resultType, timeout)
.Why do users need to pass a timeout to
getResultAsync
if they pass it intoFuture.get(timeout)
.Most users just use
WorkflowStub#getResultAsync(resultType)
not understanding that they create a leak if the workflows don't finish fast.Describe the solution you'd like
Instead of that, Temporal Java SDK code should maintain a weak or phantom reference on the CompletableFuture that we return to the users and cancel the background long poll when it's discarded by the user code.
The text was updated successfully, but these errors were encountered: