]> Cypherpunks repositories - gostls13.git/commit
runtime: make time slice a const
authorAustin Clements <austin@google.com>
Mon, 23 Mar 2015 17:27:24 +0000 (13:27 -0400)
committerAustin Clements <austin@google.com>
Tue, 14 Apr 2015 22:06:32 +0000 (22:06 +0000)
commita23a341e10132532b3922ad7a77508df24db75f2
tree0ef26c178ddbbcf8b8df8a2a76f2198cdf109705
parent69001e404ecd8a802c2c8bf87772e20f56ec78fd
runtime: make time slice a const

A G will be preempted if it runs for 10ms without blocking. Currently
this constant is hard-coded in retake. Move it to a global const.
We'll use the time slice length in scheduling background GC.

Change-Id: I79a979948af2fad3afe5df9d4af4062f166554b7
Reviewed-on: https://go-review.googlesource.com/8838
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/proc1.go