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

When exiting, monitored component should unregister itself #22468

Closed
gterzian opened this issue Dec 15, 2018 · 1 comment
Closed

When exiting, monitored component should unregister itself #22468

gterzian opened this issue Dec 15, 2018 · 1 comment

Comments

@gterzian
Copy link
Member

@gterzian gterzian commented Dec 15, 2018

A component currently registered with the background-hang-monitor will start "hanging" after exiting, because it doesn't unregister itself, nor does it go into "waiting" mode, instead, it handles the last "exit" task, and quits. From the monitor's perspective, the component will later start hanging on that last "exit" task.

This will require:

  1. Adding a Unregister message
  2. Adding a unregister method, either for this or that trait(I would say rather BackgroundHangMonitor), as well as corresponding implementations.
  3. When Layout exits, unregister it with the monitor.
  4. When Script exits, do the same thing.
  5. Add a test case, for example by asserting that no "hang alerts" are received from an unregistered component, which has just done a notify_activity, followed by unregistering itself, followed by either sleeping until the timeout is reached, or quitting.
@CYBAI
Copy link
Collaborator

@CYBAI CYBAI commented Dec 16, 2018

@csmoe is working on it at #22474 so labeled as C-assigned.

bors-servo added a commit that referenced this issue Dec 18, 2018
Unregister components while exiting

r=@gterzian

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22468 (GitHub issue number if applicable)

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22474)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Dec 18, 2018
Unregister components while exiting

r=@gterzian

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22468 (GitHub issue number if applicable)

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22474)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.