Needless unlock when job’s completed or existed?

Is it necessary to unlock the current job when checking it’s completed, exited or cancelled? Here is the code line.

If we unlock the current job, WatchError will be raised and then it’ll turn to the second while loop. While if we don’t unlock the current job, the _job_lock_id will be set during current while loop. I think it’ll also work well.

Am I right? Looks forward for comments here, Thanks!