Just for curiosity, why 10ms?
Author told a answer.
See https://go-review.googlesource.com/c/go/+/8838/.
On Wednesday, March 2, 2022 at 11:46:20 PM UTC+8 Hans Allen wrote:
>
> It seems 10ms.
>
> Introduced originally in go1.2
> See https://codereview.appspot.com/10796043
It seems 10ms.
Introduced originally in go1.2
See https://codereview.appspot.com/10796043.
On Monday, February 28, 2022 at 9:10:06 PM UTC+8 Hans Allen wrote:
>
> Since go1.14, cpu busy goroutine will not occupy a P indefinitely any
> more. This is done by a cool feature: async
It seems 10ms.
Introduced originally in go1.2. See
https://codereview.appspot.com/10796043.
On Monday, February 28, 2022 at 9:10:06 PM UTC+8 Hans Allen wrote:
>
> Since go1.14, cpu busy goroutine will not occupy a P indefinitely any
> more. This is done by a cool feature: async
Since go1.14, cpu busy goroutine will not occupy a P indefinitely any
more. This is done by a cool feature: asynchronously preemption.
There is one extra NoP thread(sysmon) runs time to time. It checks if
current goroutine has run 10+ms. If so, signal the M runs this goroutine
to switch to a