Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windowCount + share + take(1) does not complete correctly. #1698

Closed
Dorus opened this issue May 10, 2016 · 3 comments
Closed

windowCount + share + take(1) does not complete correctly. #1698

Dorus opened this issue May 10, 2016 · 3 comments
Assignees

Comments

@Dorus
Copy link

Dorus commented May 10, 2016

Rx.Observable.interval(500)
.windowCount(1)
.do(v => console.log('before share'))
.share()
.do(v => console.log('after share'))
.take(1)
.mapTo(0)
.subscribe(console.log.bind(console), null, () => console.log('completed'));

prints:

"before share"
"after share"
0
"completed"
"before share"
"before share"
"before share"
"before share"
"before share"
...

(endless repetition).

I'm not sure what's going on here, but after reading completed i would expect the source to stop also. Replace .take(1) with .take(0) or .take(2) and it does stop as expected.

@Dorus Dorus changed the title windowCount + share + take(1) + switch does not complete correctly. windowCount + share + take(1) does not complete correctly. May 10, 2016
@trxcllnt trxcllnt self-assigned this May 10, 2016
@trxcllnt
Copy link
Member

resolved by #1705 and #1708

@kwonoj
Copy link
Member

kwonoj commented Jun 23, 2016

Closing by PR's checked in.

@kwonoj kwonoj closed this as completed Jun 23, 2016
@lock
Copy link

lock bot commented Jun 7, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants