Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

Impossible to interrupt a long-running media item upload if invoked via blocking method #43

Description

@ylexus

As per #30 (comment), I can confirm that interrupting the upload via interrupting the thread blocked on
client.uploadMediaItemCallable().futureCall(uploadRequest).get()
works.
However, as before, both
client.uploadMediaItem()
and
client.uploadMediaItemCallable().call(uploadRequest)
block uninterruptibly,
because ApiExceptions.callAndTranslateApiException calls Futures.getUnchecked(future), which blocks uninterruptibly by design.

I don't know in which situation one would ever want to block uninterruptibly to be honest. It's a road to unresponsive apps, leaking threads etc. Also, the behaviour should be symmetrical regardless of how you invoke the API. At the very least, the interrupt behaviour must be documented.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions