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

V2: Bug in parallel shutdown #76

Open
samber opened this issue May 7, 2024 · 3 comments
Open

V2: Bug in parallel shutdown #76

samber opened this issue May 7, 2024 · 3 comments
Milestone

Comments

@samber
Copy link
Owner

samber commented May 7, 2024

I'm opening an issue to investigate a bug from @GreyXor, shared in #45.

I have two services, Config and Event. Where Event is a dependency of Config.

type ConfigService struct {
	Event *event.Service
}

In my Config's shutdown method, I calling anEvent's method.

With v2.0.0-beta.3, it's working as expected because the actual reverse order is respected.
With v2.0.0-beta.5, it's randomly not working because Event is randomly Shutdown before Config. (because of the async)

@GreyXor I was not able to replicate this bug. Can you write a demo?

FYI, I just added a commit to v2 for supporting shutdown on circular dependencies.

@GreyXor
Copy link
Contributor

GreyXor commented May 7, 2024

Hello, sorry but I cannot replicate it anymore. I rewrote my services, as i'm not doing like this anymore.

@samber samber added this to the v2 milestone May 7, 2024
@samber samber mentioned this issue May 7, 2024
50 tasks
@GreyXor
Copy link
Contributor

GreyXor commented May 7, 2024

@samber I will try to redo-it with the next v2 release. (containing the commit for supporting shutdown on circular dependencies). 👍

@GreyXor
Copy link
Contributor

GreyXor commented May 21, 2024

@samber it's normal between 2 run of my app; the shutdown order is not the same ?

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

No branches or pull requests

2 participants