You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/util/eventbus
M. J. Fromberger 4c856078e4
util/eventbus: block for the subscriber during SubscribeFunc close (#17642)
Prior to this change a SubscriberFunc treated the call to the subscriber's
function as the completion of delivery. But that means when we are closing the
subscriber, that callback could continue to execute for some time after the
close returns.

For channel-based subscribers that works OK because the close takes effect
before the subscriber ever sees the event. To make the two subscriber types
symmetric, we should also wait for the callback to finish before returning.
This ensures that a Close of the client means the same thing with both kinds of
subscriber.

Updates #17638

Change-Id: I82fd31bcaa4e92fab07981ac0e57e6e3a7d9d60b
Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
1 month ago
..
assets util/eventbus: add a debug HTTP handler for the bus 9 months ago
debug-demo cmd/tailscaled, ipn/localapi, util/eventbus: don't link in regexp when debug is omitted 2 months ago
eventbustest util/eventbus/eventbustest: add support for synctest instead of timers (#17522) 2 months ago
bench_test.go util/eventbus: add basic throughput benchmarks (#15284) 9 months ago
bus.go util/eventbus: allow logging of slow subscribers (#17705) 1 month ago
bus_test.go util/eventbus: block for the subscriber during SubscribeFunc close (#17642) 1 month ago
client.go util/eventbus: allow logging of slow subscribers (#17705) 1 month ago
debug.go util/eventbus: allow logging of slow subscribers (#17705) 1 month ago
debughttp.go cmd/tailscaled, ipn/localapi, util/eventbus: don't link in regexp when debug is omitted 2 months ago
debughttp_off.go cmd/tailscaled, ipn/localapi, util/eventbus: don't link in regexp when debug is omitted 2 months ago
doc.go util/eventbus: add test helpers to simplify testing events (#16294) 5 months ago
fetch-htmx.go util/eventbus: add a debug HTTP handler for the bus 9 months ago
monitor.go util/eventbus: add a Done method to the Monitor type (#17263) 2 months ago
publish.go util/eventbus: flesh out docs a bit 2 months ago
queue.go util/eventbus: make internal queue a generic type 9 months ago
subscribe.go util/eventbus: block for the subscriber during SubscribeFunc close (#17642) 1 month ago