Completed implementation of WaitAll (fixes #9)