lock acquired before sending data