What is ScheduleUpdate().Complete() doing for me here?

Hi,
I’m digging into the Unity Transport preview package and following the example in the manual here:
https://docs.unity3d.com/Packages/com.unity.transport@0.3/manual/workflow-client-server.html#server-update-loop

I’m confused about the usage of: m_Driver.ScheduleUpdate().Complete();
It says that we have to “make sure to call the Complete method on the JobHandle that is returned, in order to know when you are ready to process any updates.”
How does calling this function allow me to know if the job is complete?

If I was instead doing this:
if (m_Driver.ScheduleUpdate().IsCompleted)
{
}
Then yeah, it would make perfect sense, but as it stands right now it just doesn’t make any sense to me.

Calling Complete() on the JobHandle will block the main thread until the job completes.

1 Like

Ah I see.
Thank you