1
0

A more clarified comment for inotifyCount const.

This commit is contained in:
Alexander Andreev 2022-05-25 19:18:57 +04:00
parent 7e689438ae
commit b243c375e0
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -11,8 +11,10 @@ import (
const CrDelMask uint32 = syscall.IN_CREATE | syscall.IN_DELETE const CrDelMask uint32 = syscall.IN_CREATE | syscall.IN_DELETE
// inotifyCount is amount of InotifyEvent structures // inotifyCount is amount of InotifyEvent structures
// we read in WatchForMask(). 16 was chosen experimentally, // we read in WatchForMask(). 16 was chosen experimentally.
// with lesser amount events are often missing. // Use of sparse files (with preoccupied space using Seek())
// allows us to have a little buffer. With smaller number
// events are often missing.
const inotifyCount = 16 const inotifyCount = 16
type InotifyWatcher struct { type InotifyWatcher struct {