summaryrefslogtreecommitdiffhomepage
path: root/control/controlknobs
diff options
context:
space:
mode:
authorM. J. Fromberger <fromberger@tailscale.com>2025-09-16 07:44:08 -0700
committerGitHub <noreply@github.com>2025-09-16 07:44:08 -0700
commit5b5ae2b2eea44f30ea4afe78f2176d1b3fcd4809 (patch)
treeb3b85496e0851f60cd116513f11e77fae17cf195 /control/controlknobs
parent5ad3bd9f47ab631bf10d6f480e7c22850e7c024f (diff)
downloadtailscale-5b5ae2b2eea44f30ea4afe78f2176d1b3fcd4809.tar.xz
tailscale-5b5ae2b2eea44f30ea4afe78f2176d1b3fcd4809.zip
util/eventbus: add a Done channel to the Client (#17118)
Subscribers already have a Done channel that the caller can use to detect when the subscriber has been closed. Typically this happens when the governing Client closes, which in turn is typically because the Bus closed. But clients and subscribers can stop at other times too, and a caller has no good way to tell the difference between "this subscriber closed but the rest are OK" and "the client closed and all these subscribers are finished". We've worked around this in practice by knowing the closure of one subscriber implies the fate of the rest, but we can do better: Add a Done method to the Client that allows us to tell when that has been closed explicitly, after all the publishers and subscribers associated with that client have been closed. This allows the caller to be sure that, by the time that occurs, no further pending events are forthcoming on that client. Updates #15160 Change-Id: Id601a79ba043365ecdb47dd035f1fdadd984f303 Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
Diffstat (limited to 'control/controlknobs')
0 files changed, 0 insertions, 0 deletions