-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
When exiting, monitored component should unregister itself #22468
Copy link
Copy link
Closed
Labels
A-constellationInvolves the constellationInvolves the constellationA-content/scriptRelated to the script threadRelated to the script threadA-layout/uncategorizedC-assignedThere is someone working on resolving the issueThere is someone working on resolving the issueE-more-complexVariable effort required; may require a mentor. Recommended solution is clearly described in the issVariable effort required; may require a mentor. Recommended solution is clearly described in the iss
Description
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:
- Adding a
Unregistermessagepub enum MonitoredComponentMsg { - Adding a
unregistermethod, either for this or that trait(I would say ratherBackgroundHangMonitor), as well as corresponding implementations. - When Layout exits, unregister it with the monitor.
- When Script exits, do the same thing.
- 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-constellationInvolves the constellationInvolves the constellationA-content/scriptRelated to the script threadRelated to the script threadA-layout/uncategorizedC-assignedThere is someone working on resolving the issueThere is someone working on resolving the issueE-more-complexVariable effort required; may require a mentor. Recommended solution is clearly described in the issVariable effort required; may require a mentor. Recommended solution is clearly described in the iss