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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
// 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
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.

}

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

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