tun: windows: spin for only a millisecond/80
Performance stays the same as before.
This commit is contained in:
parent
1ff37e2b07
commit
b4010123f7
|
@ -215,7 +215,7 @@ retry:
|
||||||
if tun.close {
|
if tun.close {
|
||||||
return 0, os.ErrClosed
|
return 0, os.ErrClosed
|
||||||
}
|
}
|
||||||
if time.Since(start) >= time.Millisecond*50 {
|
if time.Since(start) >= time.Millisecond/80 /* ~1gbit/s */ {
|
||||||
windows.WaitForSingleObject(tun.rings.send.tailMoved, windows.INFINITE)
|
windows.WaitForSingleObject(tun.rings.send.tailMoved, windows.INFINITE)
|
||||||
goto retry
|
goto retry
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue