Skip to content

Commit

Permalink
tweaking scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
pparizek committed Jul 1, 2013
1 parent cbe938f commit 444896e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ public void begin() {
kr.lock.lock();

// we must break transition here because there may be no thread choices at "park/unpark"
Thread.yield();
// not necessary when we limit consecutive runs of every process
//Thread.yield();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ public void run() {
}

count++;

// let other threads run after each completed session
Thread.yield();
}
}
}
Expand Down

0 comments on commit 444896e

Please sign in to comment.