aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com
diff options
context:
space:
mode:
authorFelix Lange <fjl@users.noreply.github.com>2018-01-03 22:50:33 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-01-03 22:50:33 +0800
commitb47285f1cf0cb475f29322ceb9fac4d7e1cfb11f (patch)
tree3d0dfdafd5468ba5a9c33440096323814f2ec768 /vendor/github.com
parentb8caba97099ee5eed33c3b80dd4ea540722e7d8f (diff)
downloadgo-tangerine-b47285f1cf0cb475f29322ceb9fac4d7e1cfb11f.tar
go-tangerine-b47285f1cf0cb475f29322ceb9fac4d7e1cfb11f.tar.gz
go-tangerine-b47285f1cf0cb475f29322ceb9fac4d7e1cfb11f.tar.bz2
go-tangerine-b47285f1cf0cb475f29322ceb9fac4d7e1cfb11f.tar.lz
go-tangerine-b47285f1cf0cb475f29322ceb9fac4d7e1cfb11f.tar.xz
go-tangerine-b47285f1cf0cb475f29322ceb9fac4d7e1cfb11f.tar.zst
go-tangerine-b47285f1cf0cb475f29322ceb9fac4d7e1cfb11f.zip
vendor: update github.com/rjeczalik/notify (#15801)
Diffstat (limited to 'vendor/github.com')
-rw-r--r--vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go b/vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go
index fb70de6af..2248a1b12 100644
--- a/vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go
+++ b/vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go
@@ -26,9 +26,9 @@ import "C"
import (
"errors"
"os"
+ "runtime"
"sync"
"sync/atomic"
- "time"
"unsafe"
)
@@ -63,6 +63,10 @@ var (
func init() {
wg.Add(1)
go func() {
+ // There is exactly one run loop per thread. Lock this goroutine to its
+ // thread to ensure that it's not rescheduled on a different thread while
+ // setting up the run loop.
+ runtime.LockOSThread()
runloop = C.CFRunLoopGetCurrent()
C.CFRunLoopAddSource(runloop, source, C.kCFRunLoopDefaultMode)
C.CFRunLoopRun()
@@ -73,7 +77,6 @@ func init() {
//export gosource
func gosource(unsafe.Pointer) {
- time.Sleep(time.Second)
wg.Done()
}