fix deadlock when using blocking on async/await API