Implement a `shutdown` API for Glean
Categories
(Data Platform and Tools :: Glean: SDK, enhancement, P4)
Tracking
(Not tracked)
People
(Reporter: Dexter, Unassigned)
References
Details
(Whiteboard: [telemetry:glean-rs:backlog])
On mobile platform, the Glean SDK knows it could be killed at any time. Moreover, on mobile, there's no reliable way to know when the product is going to close.
On non-mobile platform the story is a bit different: most of the times products end cleanly or are able to at least clearly tell when is shutdown happening.
We should leverage this difference and implement a "shutdown" API. The Python, C# and Rust language bindings could call this for example to gracefully interrupt ping upload.
Comment 1•6 years ago
|
||
If you'll forgive me for documenting what you might already know about shutdown in nonmobile, I wish to raise some cautions about expecting that this will ever be called or promising that specific actions will or won't be taken. If this can be maintained at the level of just a hint, that could be better from a maintenance standpoint.
Best of course would be to remain blissfully ignorant of shutdown's rat's nest of interlocking dependencies and furious nonsense.
| Reporter | ||
Comment 2•6 years ago
|
||
(In reply to Chris H-C :chutten from comment #1)
If you'll forgive me for documenting what you might already know about shutdown in nonmobile, I wish to raise some cautions about expecting that this will ever be called or promising that specific actions will or won't be taken. If this can be maintained at the level of just a hint, that could be better from a maintenance standpoint.
That's fair, thanks for doing that. I believe we should really incorporate all of our knowledge coming from Firefox Desktop when implementing this. You'll definitely be in the loop, as I believe this warrants a light design proposal.
Best of course would be to remain blissfully ignorant of shutdown's rat's nest of interlocking dependencies and furious nonsense.
:-D
Updated•6 years ago
|
Updated•6 years ago
|
Comment 3•5 years ago
|
||
Falsehoods Programmers Believe About Shutdown:
- It happens after init.
(To Be Continued.)
Comment 4•5 years ago
|
||
Dropping priority for now. We have such an API in the RLB. It's not clear what else this API needs to do across all implementations and thus deserves to be in glean-core.
Updated•5 years ago
|
Comment 5•3 years ago
|
||
Has it been 3 years? Wow.
Anyway, we have that API, even though maybe not exposed everywhere. Closing this.
Description
•