C#: Use of while loops inside of a coroutine

So I’m having a little issue using while loops inside of a coroutine. I think it could just be my poor understanding of coroutines in general. I have this real simple coroutine I have been calling in order to move my camera around and point it at various objects. The movement works pretty well however I don’t really understand how to get code outside of the while loop inside the coroutine to run? Does this have to do with where I am yielding? Here’s my code

IEnumerator repositionCam () {
	while (cameraMovement < 1) {
		cameraMovement += camFocusSpeed * Time.deltaTime;
		transform.position = Vector3.Lerp(transform.position, transform.position + offset, cameraMovement);
		yield return null;
	}
    Debug.Log("This code never runs");
}

Why is that code down there never executing? How could I hook into something (another method, whatever) once I hit cameraMovement > 1.

I’ve tried placing the return outisde of the while loop but that seems to actually crash unity…

The while loop will continue as long as cameraMovement is less than 1. Once it’s greater than or equal to 1, the loop ends and the rest of the code after that is executed. If something outside the coroutine prevents cameraMovement from exceeding 1, then the loop will never end.

use

 IEnumerator repositionCam () {
     while (cameraMovement < 1) {
         cameraMovement += camFocusSpeed * Time.deltaTime;
         transform.position = Vector3.Lerp(transform.position, transform.position + offset, cameraMovement);
         yield return null;
     }
      yield return 0; //<<<<Here Added
     //Debug.Log("This code never runs");
 }

to prevent crashing app, if u about this one.