]> git.cworth.org Git - apitrace/commitdiff
Don't parse concurrently with retracing.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Wed, 24 Oct 2012 13:01:49 +0000 (14:01 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Wed, 24 Oct 2012 13:01:49 +0000 (14:01 +0100)
There are race conditions.

retrace/retrace_main.cpp

index df69d4add281233ce0ba817fdef25c576c1601d8..f55d5204828894c094329b3699d83d326c688dd7 100644 (file)
@@ -223,6 +223,10 @@ static void do_all_calls(void)
             }
 
             thread_wq->queue_work(render_work);
+
+            // XXX: Flush immediately to avoid race conditions on unprotected
+            // static/global variables.
+            thread_wq->flush();
         } else {
             render_work->run();
             delete render_work;