pub unsafe extern "C" fn PxScene_lockWrite_mut(
    self_: *mut PxScene,
    file: *const c_char,
    line: u32
)
Expand description

Lock the scene for writing from this thread.

When the PxSceneFlag::eREQUIRE_RW_LOCK flag is enabled lockWrite() must be called before any write calls are made on the scene.

Only one thread may write at a time and no threads may read while a thread is writing. If a call to lockWrite() is made and there are other threads reading then the calling thread will be blocked until the readers complete.

Writers have priority. If a thread is blocked waiting to write then subsequent calls to lockRead() from other threads will be blocked until the writer completes.

If multiple threads are waiting to write then the thread that is first granted access depends on OS scheduling.

Recursive locking is supported but each lockWrite() call must be paired with an unlockWrite().

If a thread has already locked the scene for writing then it may call lockRead().