release lock before call func