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

Avoid caching nobody when actor doesn't exist in registry #501

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

JamesNorris153
Copy link
Contributor

@JamesNorris153 JamesNorris153 commented Oct 9, 2024

Fixes #502

Changes

Avoids caching Nobody as the actor ref for a RequiredActor if it has not been registered yet

Copy link

@rhys-douglas rhys-douglas left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

LGTM - good catch folks

var cachedActorRef = await myRequiredActor.GetAsync();

// assert
cachedActorRef.Should().NotBeOfType<Nobody>();
Copy link
Member

Choose a reason for hiding this comment

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

LGTM

{
return _internalRef;
return _internalRef = internalRef;
Copy link
Member

Choose a reason for hiding this comment

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

LGTM - good catch

@Aaronontheweb Aaronontheweb enabled auto-merge (squash) October 10, 2024 16:50
@Aaronontheweb Aaronontheweb merged commit 35bedd0 into akkadotnet:dev Oct 10, 2024
2 checks passed
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.

Required Actors return Nobody if accessed before being registered
3 participants