`n` was left over being always zero. But you want `win32.WaitForMultipleObjects` to be the number of threads to wait for which u already have with `j`.