Skip to content

Allow marking a stream complete in propulsion#268

Open
nordfjord wants to merge 1 commit intojet:masterfrom
nordfjord:stream-completion
Open

Allow marking a stream complete in propulsion#268
nordfjord wants to merge 1 commit intojet:masterfrom
nordfjord:stream-completion

Conversation

@nordfjord
Copy link
Contributor

This is useful for cases where you have a lot of small streams that get
discarded, otherwise the StreamStates map grows uncontrollably for no
value whatsoever.

Adds a sentinel value of -2L to represent a completed stream, once this
is returned the stream is removed from all state tracking.

NOTE: This does mean that we lose some guarantees, the handler might be
called again for the same stream due to at-least-once shenanigans.

This is useful for cases where you have a lot of small streams that get
discarded, otherwise the StreamStates map grows uncontrollably for no
value whatsoever.

Adds a sentinel value of -2L to represent a completed stream, once this
is returned the stream is removed from all state tracking.

NOTE: This does mean that we lose some guarantees, the handler might be
called again for the same stream due to at-least-once shenanigans.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant