Skip to content

Allow marking a stream complete in propulsion#268

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

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

Conversation

@nordfjord
Copy link
Copy Markdown
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.
@nordfjord
Copy link
Copy Markdown
Contributor Author

Clsoing, probably not worth implementing

@nordfjord nordfjord closed this Apr 1, 2026
@bartelink
Copy link
Copy Markdown
Collaborator

Like #129 I don't mind feature idea sketches in PR form hanging around. That said, given it's not been proceeded with on the JS side, I can see the reasoning

Though there's a lot to be said for having a short list of realistic things only (and keeping feature ideas like this in some form of longlist like jet/equinox#232)

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.

2 participants