Closed jrandolf-2 closed 9 months ago
Any specific reason we're only doing this for dedicated workers? I think the same approach also works for shared workers.
@jgraham So I'm a little conflicted right now about exposing all owners. What I really want to expose is the "initial owner", not necessarily all of them. If we want to expose all of them, then we'd need events like realm.ownerAdded
and realm.ownerRemoved
to really capture the entire lifecycle of ownership.
What do you think about extending this to that length?
I think dedicated workers only ever have one owner, so for that case the events don't seem necessary. For shared workers it makes more sense to me to expose the owners in the same way we do for dedicated workers, but not add lifecycle events until there's clear user demand that it does to not expose the owners because we don't also have lifecycle events.
So, for now, I'd just add the field and information to all worker types, so that we at least have a consistent basis to build from, and consider extending the support later if necessary.
I think dedicated workers only ever have one owner, so for that case the events don't seem necessary. For shared workers it makes more sense to me to expose the owners in the same way we do for dedicated workers, but not add lifecycle events until there's clear user demand that it does to not expose the owners because we don't also have lifecycle events.
So, for now, I'd just add the field and information to all worker types, so that we at least have a consistent basis to build from, and consider extending the support later if necessary.
Done.
Every dedicated worker has an outside setting that it's created under. This info is needed to understand the tree structure of dedicated workers.
Preview | Diff