fix the problem where mutex unlock may be blocked by return