参考 package main import ( "fmt" "sync/atomic" "time" ) func main() { var count uint32 trigger := func(i uint32, fn func()) { for { if n := atomic.LoadUint32(&count); n == i { fn() atomic.AddUint32(&count, 1) break } ti
4.1 Introduction 4.2 stat, fstat, fstatat, and lstat Functions The lstat function is similar to stat, but when the named file is a symbolic link, lstat returns information about the symbolic link, not the file referenced by the symbolic link. 4.3 文件类