See Frame Locking.
Wait causes a thread to yield execution until the next frame begins. Retaining a frame lock following a call to Wait is optional, via the bLock parameter. If lock is retained, there must be one unlock call per successful lock call. Wait should not be used in a thread that already has frame lock acquired, as this results in deadlock (it is logically impossible).
Fully Qualified Name
static public void Wait(bool bLock);
- [In] bool bLock
- If true, retains an acquired frame lock. If false, the implicit frame lock is released.