mirror of
https://github.com/golang/go
synced 2024-11-13 17:00:22 -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:
parent
e33e476e07
commit
d1b66439f9
@ -175,6 +175,7 @@ timerproc(void)
|
||||
|
||||
for(;;) {
|
||||
runtime·lock(&timers);
|
||||
timers.sleeping = false;
|
||||
now = runtime·nanotime();
|
||||
for(;;) {
|
||||
if(timers.len == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user