PersistentManager.Lock stalled main thread.

PersistentManager.Lock stalled main thread.how to solve this problem in StartCoroutine
thanks

What is a persistent manager?
Its nothing from unity so I would check what you are doing from the outside.

Should it be some kind of .NET thing, keep in mind that locks are meant for short time usages and that you must not lock something from the main thread (as the whole mainthread has to wait for the lock), locks/semaphores are for interthread syncronization, commonly among worker threads

You’re probably trying to monitor an AsyncOperation from a Coroutine on an object that will be going away when the operation finishes.

For example, trying to load a level asynchronously and keep a progress bar going – but not having called DontDestroyOnLoad on the object that has the coroutine that will update the progress bar.

-JF