Skip to content

Commit

Permalink
chore(core): add syntactic sugar getSync method for millisec based...
Browse files Browse the repository at this point in the history
...timeouts
  • Loading branch information
cmark committed Jan 10, 2025
1 parent 30fb0a6 commit c22cf5a
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ public final class Promise<T> extends Observable<T> {
public T getSync() {
return getSyncResponse().getBody();
}

/**
* @param timeoutInMillis
* @return the response body when this Promise becomes resolved or throw an error if the specified timeout (in milliseconds) expires.
* @since 9.6
*/
public T getSync(final long timeoutInMillis) {
return getSync(timeoutInMillis, TimeUnit.MILLISECONDS);
}

/**
* @param timeout
Expand Down

0 comments on commit c22cf5a

Please sign in to comment.