Class BodyLockInterfaceNoLock

All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<JoltPhysicsObject>

public class BodyLockInterfaceNoLock extends BodyLockInterface
A BodyLockInterface that doesn't automatically lock bodies.
  • Method Details

    • lockRead

      public SharedMutex lockRead(int bodyId)
      Lock the specified body for reading.
      Specified by:
      lockRead in class BodyLockInterface
      Parameters:
      bodyId - the ID of the body to read
      Returns:
      a new mutex
    • lockWrite

      public SharedMutex lockWrite(int bodyId)
      Lock the specified body for writing.
      Specified by:
      lockWrite in class BodyLockInterface
      Parameters:
      bodyId - the ID of the body to write
      Returns:
      a new mutex
    • unlockRead

      public void unlockRead(SharedMutex mutex)
      Unlock the specified mutex, which was created to read a body.
      Specified by:
      unlockRead in class BodyLockInterface
      Parameters:
      mutex - the mutex to unlock (not null)
    • unlockWrite

      public void unlockWrite(SharedMutex mutex)
      Unlock the specified mutex, which was created to write a body.
      Specified by:
      unlockWrite in class BodyLockInterface
      Parameters:
      mutex - the mutex to unlock (not null)