reactive-grpc icon indicating copy to clipboard operation
reactive-grpc copied to clipboard

Add onDiscard hook support to AbstractStreamObserverAndPublisher

Open bruto1 opened this issue 3 years ago • 0 comments

Currently, upon cancellation it just clears the queue, but its elements, for example, can be backed by reference counted objects which need to be released before being garbage collected (it's possible thanks to https://github.com/GoogleCloudPlatform/grpc-gcp-java/pull/77 ) An example of when and how discarding is done can be found in FluxFlatMap, for example, or any other operator impl with a queue

bruto1 avatar Feb 13 '22 17:02 bruto1