summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Piechotka <uzytkownik2@gmail.com>2014-10-11 23:23:28 -0700
committerMaciej Piechotka <uzytkownik2@gmail.com>2014-10-11 23:28:07 -0700
commit14ada432f82a5f1d4b65918e2a2de67a28e7e9db (patch)
treefd30781399b1a5b1efe216b4a9a5bc949967c154
parentc3d18f5cd5bcf362fdf6cb23e60a52d4b5c7e775 (diff)
downloadlibgee-14ada432f82a5f1d4b65918e2a2de67a28e7e9db.tar.gz
Sleep 100 ms in GC thread when there is nothing to do
Temporal fix for bug 737507 until something more sane would come up while still being lock free.
-rw-r--r--gee/hazardpointer.vala3
1 files changed, 3 insertions, 0 deletions
diff --git a/gee/hazardpointer.vala b/gee/hazardpointer.vala
index 22aca16..f95fd74 100644
--- a/gee/hazardpointer.vala
+++ b/gee/hazardpointer.vala
@@ -458,6 +458,9 @@ public class Gee.HazardPointer<G> { // FIXME: Make it a struct
Thread.yield ();
pull_from_queue (ctx._to_free, ctx._to_free.is_empty);
ctx.try_free ();
+ if (ctx._to_free.is_empty) {
+ GLib.Thread.usleep (100000);
+ }
}
});
break;