Release stream lock before calling yield