Skip to content

Conversation

danielcweber
Copy link
Collaborator

No description provided.

…nnect to the ConnectableObservable, if the preceeding subscription terminated synchronously.
{
var subscription = parent._source.SubscribeSafe(this);
Run(_parent._source);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would have very obvious correctness if Run... would go into the lock.

In this solution, _count might become negative again but I think it's still correct, if 2 subscribers would interleave, one of them would still succeed in connecting.

@akarnokd
Copy link
Collaborator

akarnokd commented Jul 6, 2018

I'm currently running a multi-hour benchmark but after that, I can have a look at the problem.

@danielcweber danielcweber deleted the OptimizeRefCount branch July 6, 2018 15:08
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