Make sure that an async function is not run multiple times at once