fix bug in wait_for_all depending on where it was called from
fix procshutdown so it can be called from any thread
dont cancel tasks in other threads in wait_for_all