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

Poision and Stop will now use Context mechanics in favor of a WaitGroup. #175

Merged
merged 3 commits into from
Jan 29, 2025

Conversation

anthdm
Copy link
Owner

@anthdm anthdm commented Jan 4, 2025

No description provided.

@anthdm anthdm requested a review from perbu January 4, 2025 08:41
actor/engine.go Outdated
// e.SendLocal(pid, pill, nil)
// return _wg
// }

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you really need to keep this around?

Copy link
Owner Author

Choose a reason for hiding this comment

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

nope. :)

Copy link
Collaborator

@perbu perbu left a comment

Choose a reason for hiding this comment

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

This is a good improvement. The use of waitgroups was a bit "clever" . This will lower the barrier to entry.

actor/process.go Outdated
}

func (p *process) PID() *PID { return p.pid }
func (p *process) Send(_ *PID, msg any, sender *PID) {
p.inbox.Send(Envelope{Msg: msg, Sender: sender})
}
func (p *process) Shutdown(wg *sync.WaitGroup) { p.cleanup(wg) }
func (p *process) Shutdown() {
// p.cleanup()
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we need to call cleanup here

@anthdm anthdm merged commit 4a508e1 into master Jan 29, 2025
2 checks passed
@anthdm anthdm deleted the context branch January 29, 2025 15:47
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.

3 participants