Windows: Wait for all worker threads to exit
The signalling mechanism for waking and shutting down worker threads
relies upon a per-queue event. Therefore it is not guaranteed that
the worker thread that AFSShutdown*Thread() is attempting to wait
for is in fact the thread that will be woken and exit. Modify the
code to loop waking threads until the one that is being waited for
does in fact exit.
Subsequent calls to AFSShutdown*Thread() will bypass the wait if
the thread has already exited.
Change-Id: I4555df062ac5a6161b5c55f4598d1bd34e144a2b
Reviewed-on: http://gerrit.openafs.org/8783
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>