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
I believe that this stream is a MemoryStream due to the startWith operator. When I add a listener after this stream has completed, the values appear to be emitted in reverse ('world' then 'hello' instead of 'hello' then 'world').
I did some sleuthing and considered that since the MemoryStream holds on to the last emitted value, perhaps it was simply holding on to 'world' and then emitting the next known value 'hello', then emitting a maximum of two of those values and terminating. That behavior would make it appear that the stream had somehow been reversed.
Is that behavior expected? I don't really know how to isolate the question further than that - it may not be an issue with MemoryStream, it may be an issue with take, or it may be not an issue at all.
The text was updated successfully, but these errors were encountered:
…ions
Fix MemoryStream to teardown its own internal memory after its execution ends, particularly, when
the last listener is removed and async stop is executed, which is not necessarily the _x() teardown.
Fixes issue #71.
I'm experiencing what seems like odd behavior when working with MemoryStreams and stream completion using xstream.
Consider a stream composed like so:
I believe that this stream is a MemoryStream due to the
startWith
operator. When I add a listener after this stream has completed, the values appear to be emitted in reverse ('world'
then'hello'
instead of'hello'
then'world'
).Here is a bin which demonstrates my experience.
I did some sleuthing and considered that since the MemoryStream holds on to the last emitted value, perhaps it was simply holding on to
'world'
and then emitting the next known value'hello'
, then emitting a maximum of two of those values and terminating. That behavior would make it appear that the stream had somehow been reversed.Is that behavior expected? I don't really know how to isolate the question further than that - it may not be an issue with MemoryStream, it may be an issue with take, or it may be not an issue at all.
The text was updated successfully, but these errors were encountered: