- Fix crash - wait on the threads themselves, not on Event objects.
It takes time between the time a thread signals the event, and the
time it actually terminates (shutdown code) - so FreeLibrary() and
the main() termination could occur before all of the threads
terminated...