Closed imsodin closed 6 years ago
Looks like indeed race between cgo handler and unwatch, I don't see off-hand those two can be synchronised. Thanks for the fix @imsodin!
PS I see tests on macos builder gets sigkilled - since it runs older 1.7 I thought it'd be worth a shot to update go version to the latest one, no problem with that?
Since using notify in Syncthing the following panic occurs randomly (see syncthing/syncthing#4854):
From a quick glance at the code it seems like this could be a race between unwatching and receiving an event from the C code. I believe this change should prevent a panic, but I do not know whether there is an underlying problem that should be addressed instead.