Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/runtime/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,13 @@ func addSleepTask(t *task, duration int64) {
// Run the scheduler until all tasks have finished.
func scheduler() {
// Main scheduler loop.
var now timeUnit
for {
scheduleLog("")
scheduleLog(" schedule")
now := ticks()
if sleepQueue != nil {
now = ticks()
}

// Add tasks that are done sleeping to the end of the runqueue so they
// will be executed soon.
Expand Down