Skip to content

Expose ListenableFuture instead of Future for asynchronous operations #1412

@garrettjonesgoogle

Description

@garrettjonesgoogle

We currently expose Future for asynchronous calls in PubSub and Logging, which creates a problem for thread consumption because every get() call needs a thread while the asynchronous work is outstanding, whereas callbacks (supported by ListenableFuture) don't consume a thread. A potential issue with converting to ListenableFuture is that it makes a Guava class part of our interface. @mziccard , is that why Future was used?

Metadata

Metadata

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