Re: [w3ctag/design-reviews] Extended lifetime shared workers (Issue #1089)

asutherland left a comment (w3ctag/design-reviews#1089)

I understood Domenic to be concisely expressing that the runCleanupOnExit could be implemented in terms of existing primitives with the minimal changes in https://gist.github.com/domenic/c5bd38339f33b49120ae11b3b4af5b9b without introducing more expansive new primitives, not suggesting the proposals were isomorphic.

I do agree that if the implementation was a self-hosted function that literally expanded into Domenic's example code that it would not be that hard to implement, but I have significant problems with what the name promises because...

> FWIW, I wouldn't consider this an obligation to run any more than "pagehide" event delivery is [reliable](https://developer.mozilla.org/en-US/docs/Web/API/Window/pagehide_event#:~:text=this%20event%20is%20not%20reliably%20fired%20by%20browsers).

This doesn't stop people from filing bugs about it and their use cases.  I very much do not want to sign up for an ongoing series of fresh debates in bugzilla and on github where I am arguing that the API called "run cleanup on exit" does not and should not reliably run cleanup on exit.  In particular, it feels like the people arguing that it should would have a very good point.  (I also expect a lot of people would be surprised that they can't put a function in and have it run in the current global, but structured cloning at least would throw immediately instead of coercing silently into nothing.)


-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/1089#issuecomment-3238302668
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/1089/3238302668@github.com>

Received on Friday, 29 August 2025 21:21:04 UTC