Files
notify/debug_debug.go
T
Pawel Knap f822991fc0 readdcw: close handle during unwatch state
The Unwatch method on Windows is asynchronous. Thus when calling
Watch, Unwatch and Watch on the same path the Unwatch state may
happen after the second Watch call. This means that second Watch
will be skipped as already created.

This commit makes second Watch call invalidate Unwatch state. So
Watch->Unwatch->Watch will be basically a no-op. This doesn't
solve all the problems since the second Watch might have different
events to handle. However, this should be solved by using Rewatch
method.

Also, the code fixes a data race that may occur when invalidating
grip handle.

Fixes: #150
2018-05-01 21:03:15 +02:00

10 lines
222 B
Go

// Copyright (c) 2014-2018 The Notify Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
// +build debug
package notify
var debugTag = true