[sgen] Sleep a little while busy-waiting for the gray queue distribution.
authorMark Probst <mark.probst@gmail.com>
Mon, 9 Aug 2010 20:07:47 +0000 (22:07 +0200)
committerMark Probst <mark.probst@gmail.com>
Mon, 9 Aug 2010 20:11:31 +0000 (22:11 +0200)
commit559bce83beb252249af34162032085df76e2dea3
treef28303a481f00de1562187f3a9f7d053780904a4
parentf61961c036d518d8d524c3e43508d0f36a170a89
[sgen] Sleep a little while busy-waiting for the gray queue distribution.

In the parallel collector, the main GC thread needs to distribute all
remaining entries in the gray queue to the worker threads.  Since the
distribution pool is limited in size we need to wait on it, which at
this point is only possible with busy-waiting.  Since we don't want to
use up CPU resources and hog the cache lines we wait 2ms between
distribution attempts.
mono/metadata/sgen-gc.c