• Glenn Kasten's avatar
    Bug 5044578 Fix race in engine destroy on uni · d527933b
    Glenn Kasten authored
    On uniprocessor, the main thread reached Engine::Destroy before the
    worker threads had even started, so they did not see the shutdown.
    
    On SMP, the worker threads were started (and blocked), so it was OK.
    
    This new code also has the advantage of shutting down quicker
    if there are pending callback requests in the queue.
    
    Change-Id: Iff8cca042ebffe48ce7cc5d798e7b3b9911fb64b
    d527933b
ThreadPool.c 13.5 KB