You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const list = range(1,100)
const stream = new Stream()
const add_to_stream = async () => {
stream.write(something)
stream.end() // would end for all other users
}
Promise.all(list.map( x => add_to_stream()))
The most simple way would be having end() only end the stream if a new refcounting per stream would turn 0.
And it would just do what it should. Am I missing something ?
Thus default refcount should be 1.
I am unsure what should be done about error and endedResult. Allow a list to be built up internally?
What should result() be returning then ? A list ? Would break code. Add resultMany() returning all ?
I don't use result in my use case.
The text was updated successfully, but these errors were encountered:
The most simple way would be having end() only end the stream if a new refcounting per stream would turn 0.
Then code would look like
And it would just do what it should. Am I missing something ?
Thus default refcount should be 1.
I am unsure what should be done about error and endedResult. Allow a list to be built up internally?
What should result() be returning then ? A list ? Would break code. Add resultMany() returning all ?
I don't use result in my use case.
The text was updated successfully, but these errors were encountered: