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-android/cmd/tailscale
Elias Naur b151de039b cmd/tailscale: simplify non-blocking coalescing channels
Three variables are used everywhere a single non-blocking producer sends
values where only the latest is relevant:

    var (
	    mu sync.Mutex
	    latest T
	    notify = make(chan struct{}, 1)
    )

By draining the notification channel before sending through it, we
can simplify to just one channel:

    latest = make(chan T, 1)

Thanks to Chris Waldon for showing me this neat trick.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
5 years ago
..
backend.go jni,cmd/tailscale: replace jni.EnvFor with explicit conversion 5 years ago
callbacks.go cmd/tailscale: simplify non-blocking coalescing channels 5 years ago
google.png cmd/tailscale: add Google sign-in button 6 years ago
logo.go cmd/tailscale: add Google sign-in button 6 years ago
main.go cmd/tailscale: simplify non-blocking coalescing channels 5 years ago
multitun.go cmd/tailscale: wait for previous tunnel(s) to close before establishing new 6 years ago
pprof.go all: initial commit 6 years ago
store.go jni,cmd/tailscale: replace jni.EnvFor with explicit conversion 5 years ago
tailscale.png all: initial commit 6 years ago
tools.go cmd/tailscale,go.*: track go-bindata tool version in go.mod 6 years ago
ui.go cmd/tailscale: use node.DisplayName for machine names 5 years ago