Skip to content

How to use keepUpstreamAlive option from the public API? #261

Answered by yigit
ferinagy asked this question in Q&A
Discussion options

You must be logged in to vote

The keep alive is for sharing purposes when there is no source of truth so it won't help here.

Also, from Store's perspective, keeping those calls alive looks very wrong (keep in mind, they could also be streams and you wouldn't want Store to keep every stream alive).

I think it is better for you to solve this outside Store. For such calls where you want it to stay alive, you can move the store request to the userScope and pass it back to the caller scope using an explicit channel. A bit verbose but given that it is intentionally denying structured concurrency, it might even be the right thing to keep verbose. (you can also always consider writing a wrapper for it :) )

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ferinagy
Comment options

@yigit
Comment options

Answer selected by ferinagy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants