• Jens Axboe's avatar
    io-wq: have manager wait for all workers to exit · fb3a1f6c
    Jens Axboe authored
    Instead of having to wait separately on workers and manager, just have
    the manager wait on the workers. We use an atomic_t for the reference
    here, as we need to start at 0 and allow increment from that. Since the
    number of workers is naturally capped by the allowed nr of processes,
    and that uses an int, there is no risk of overflow.
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    fb3a1f6c
io-wq.c 27 KB