-
Notifications
You must be signed in to change notification settings - Fork 452
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
[Components] In some rare cases the method component.stop() can work incorrectly #6358
Comments
What is the way to check for a successfully started component? I'm guessing |
kozlovsky
added a commit
to kozlovsky/tribler
that referenced
this issue
Oct 6, 2021
kozlovsky
added a commit
to kozlovsky/tribler
that referenced
this issue
Oct 6, 2021
kozlovsky
added a commit
to kozlovsky/tribler
that referenced
this issue
Oct 6, 2021
kozlovsky
added a commit
to kozlovsky/tribler
that referenced
this issue
Oct 6, 2021
kozlovsky
added a commit
to kozlovsky/tribler
that referenced
this issue
Oct 6, 2021
kozlovsky
added a commit
to kozlovsky/tribler
that referenced
this issue
Oct 6, 2021
kozlovsky
added a commit
that referenced
this issue
Oct 6, 2021
Fixes #6358: correct component's shutdown
@Solomon1732 yes, but in 2730ab8 it was renamed to if comp.started: # will evaluate to True even if component has not started yet
... Now it should look clearer: if comp.started_event.is_set():
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
During the refactoring (#6335), we found the following potential problem:
In some rare cases the method component.stop() may not work correctly.
The current implementation (simplified) is the following:
That means whatever
comp.start()
was failed or succeeded, the correspondingcomponent.stop()
will be called during a shutdown.That means
component.stop()
should distinguish initialized and uninitialized fields of the corresponding class (this is not currently being done).The text was updated successfully, but these errors were encountered: