1
0
mirror of https://github.com/golang/go synced 2024-11-12 02:50:25 -07:00

runtime: eliminate excessive notewakeup calls in timers

If the timer goroutine is wakeup by timeout,
other goroutines will still notewakeup because sleeping is still set.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/12763043
This commit is contained in:
Dmitriy Vyukov 2013-08-13 14:14:24 +04:00
parent e33e476e07
commit d1b66439f9

View File

@ -175,6 +175,7 @@ timerproc(void)
for(;;) {
runtime·lock(&timers);
timers.sleeping = false;
now = runtime·nanotime();
for(;;) {
if(timers.len == 0) {