• Dave Watson's avatar
    Fix stop() race · a574e130
    Dave Watson authored
    Summary:
    There is a race with stop() and timeouts.  stop() may race with a thread timeout, and then block indefinitely on
    joinStoppedThreads(), waiting to join the already joined timed-out thread.
    
    To fix, just put everything behind a write lock, simplifying the code at the same time.
    
    Reviewed By: davidtgoldblatt
    
    Differential Revision: D7971779
    
    fbshipit-source-id: eb4a898ca266ddda0f95033950ac041d1cc812ba
    a574e130
CPUThreadPoolExecutor.cpp 6.53 KB