Replace lock by async