Ticket 49186 - Fix NS to improve shutdown relability
Bug Description: In some cases, NS would race the condvar
and not shutdown correctly, causing pthread_join to hang
Fix Description: Instead of spinning on is_shutdown as
an atomic value, we should send shutdown jobs to the queues
allowing ns to shut itself down asynchronously rather
than synchronously. This also has the benefito f allowing
all queued jobs to complete.
https://pagure.io/389-ds-base/issue/49186
Author: wibrown
Review by: mreynolds(Thanks!!!!)
Signed-off-by: Mark Reynolds <mreynolds@redhat.com>