From c9e4a859ae8cdd7046a467afe8b50c5364c2cfc7 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Thu, 10 Dec 2020 11:25:08 -0800 Subject: device: remove starting waitgroups In each case, the starting waitgroup did nothing but ensure that the goroutine has launched. Nothing downstream depends on the order in which goroutines launch, and if the Go runtime scheduler is so broken that goroutines don't get launched reasonably promptly, we have much deeper problems. Given all that, simplify the code. Passed a race-enabled stress test 25,000 times without failure. Signed-off-by: Josh Bleecher Snyder --- device/tun.go | 1 - 1 file changed, 1 deletion(-) (limited to 'device/tun.go') diff --git a/device/tun.go b/device/tun.go index 1f88f33..3816f9b 100644 --- a/device/tun.go +++ b/device/tun.go @@ -20,7 +20,6 @@ func (device *Device) RoutineTUNEventReader() { logError := device.log.Error logDebug.Println("Routine: event worker - started") - device.state.starting.Done() for event := range device.tun.device.Events() { if event&tun.EventMTUUpdate != 0 { -- cgit v1.2.3