The code won't wait though, that's the problem