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

Wrap user stash to avoid confusion between PersistentActor.UnstashAll… #1757

Merged
merged 1 commit into from Mar 11, 2016
Merged

Wrap user stash to avoid confusion between PersistentActor.UnstashAll… #1757

merged 1 commit into from Mar 11, 2016

Conversation

cconstantin
Copy link
Contributor

… and PersistentActor.Stash.UnstashAll

I do find it fascinating (for lack of a better word) that Unstash() and UnstashAll(predicate) do not get the same treatment as UnstashAll(), i.e. prepending the user stash messages to the _internalStash. It may come up in the future.

@Aaronontheweb
Copy link
Member

All of your recent PRs are failing this test: #1762

_internalStash.Prepend(ClearStash());
}

public void UnstashAll(Func<Envelope, bool> predicate)
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this a little confusing? I mean, this stash consists of two internally, and while parameterless UnstashAll method is working on internal stash, the one with predicate works only with user stash. Maybe we should name them in a way, that is more informative about their purpose.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Horusiath this matches the akka jvm, where unstashAll overrides method from super. As I mentioned, I do find it 'not ideal'. If anything, I would throw in the wrapped 'Unstash' and 'UnstashAll(predicate)', and reserve the use to subclasses.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok. Lets settle on that.

Horusiath added a commit that referenced this pull request Mar 11, 2016
…-persistent-actors

Wrap user stash to avoid confusion between PersistentActor.UnstashAll…
@Horusiath Horusiath merged commit 3e25d9b into akkadotnet:dev Mar 11, 2016
@cconstantin cconstantin deleted the remove-confusing-UnstashAll-in-persistent-actors branch March 14, 2016 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants