When waking up thread blocked on TVars, wake oldest first (#2319)
authorJosef Svenningsson <josef.svenningsson@gmail.com>
Fri, 10 Oct 2008 15:03:22 +0000 (15:03 +0000)
committerJosef Svenningsson <josef.svenningsson@gmail.com>
Fri, 10 Oct 2008 15:03:22 +0000 (15:03 +0000)
commita970a3775856642e6d3690b5421e7dcb3e420d36
tree80c7621116e716f16c093a7f59ca5638fe0c8fb1
parentb69843467459d43168519ced8d0cf45227c4c7be
When waking up thread blocked on TVars, wake oldest first (#2319)
StgTVarWatchQueue contains the threads blocked on a TVar in order
youngest first. The list has to be traversed backwards to unpark the threads
oldest first.

This improves the fairness when using STM in some situations.
rts/STM.c