Fixed staring loop if switch() was called and it wasn't started yet
Added test for futures.as_completed with a timeout