-
Notifications
You must be signed in to change notification settings - Fork 194
Open
Description
Lines 145 to 156 in 16e310c
| for { | |
| n, err := unix.EpollWait(ep.fd, events, msec) | |
| if err != nil && err != unix.EINTR { | |
| log.Error("EpollWait: ", err) | |
| continue | |
| } | |
| if n <= 0 { | |
| msec = -1 | |
| runtime.Gosched() | |
| continue | |
| } | |
| msec = 0 |
阻塞的EpollWait调用在阻塞线程时应该也会主动让出CPU吧,看上去效果和上面runtime.Gosched() 的效果一样。还是说这里有什么神奇操作。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels