GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — The changed behavior of StreamingPullFuture.cancel() should be documented · Issue #419 · googleapis/python-pubsub

This repository was archived by the owner on Oct 13, 2026. It is now read-only.
This repository was archived by the owner on Oct 13, 2026. It is now read-only.

The changed behavior of StreamingPullFuture.cancel() should be documented #419

Copy link
Copy link
Closed
#420
Closed
The changed behavior of StreamingPullFuture.cancel() should be documented#419
#420
Copy link
Assignees
plamut
Labels
api: pubsubIssues related to the googleapis/python-pubsub API.type: docsImprovement to the documentation for an API.

Description

@plamut
plamut
opened on May 29, 2021
Issue body actions

Calling StreamingPullFuture.cancel() invokes close() on the StreamingPullManager instance, but the latter method is now non-blocking as of version v2.4.1, meaning that StreamingPullFuture.cancel() has become non-blocking as well.

This can be problematic if subscriber client is used as a context manager, and cancelling the future is the last action in it. Exiting the with block closes the underlying transport, but the streaming pull shutdown might still be in progress. If a, say, NACK request is made during the shutdown after the transport has already been closed, an error occurs (user comment).

TL; DR - user should know that cancel() is non-blocking, and that the way to block on the shutdown is by calling the streaming_pull_future.result() method instead.

Also, at least one of the samples needs to be updated as well, but that's a separate issue.

Activity

  1. plamut
    added
    type: docsImprovement to the documentation for an API.
    on May 29, 2021
  2. plamut
    self-assigned this
    on May 29, 2021
  3. product-auto-label
    added
    api: pubsubIssues related to the googleapis/python-pubsub API.
    on May 29, 2021
  4. plamut
    closed this as completedin #420on Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @plamut
    plamut

Labels

api: pubsubIssues related to the googleapis/python-pubsub API.type: docsImprovement to the documentation for an API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.