Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kqueue.go: Remove timeout from reading kevents.
Instead of having a timeout that would trigger the readEvents to check it's done channel, run a seaprate go-routine that watches w.done, and directly closes the KQueue FD. This change allows a go-process to fully sleep and go into CPU idle mode, instead of waking up every 100ms on macOS.
- Loading branch information
1 parent
57e6a49
commit 7206899
Showing
1 changed file
with
23 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters