Skip to content

difference between awaitCompletion() & awaitCompletion(long,TimeUnit) in ResultCallbackTemplate #699

Description

@iGabon

Firstly, thanks for the work on this project.
I got a question when I use this sdk on my project.
the frist method :

    public RC_T awaitCompletion() throws InterruptedException {
        completed.await();
        // eventually (re)throws RuntimeException
        getFirstError();
        return (RC_T) this;
    }

and the second one :

    public boolean awaitCompletion(long timeout, TimeUnit timeUnit) throws InterruptedException {
        return completed.await(timeout, timeUnit);
    }

I readly donot understand why the second one donot call getFirstError() after call completed.await(timeout, timeUnit);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions