RavEngine
Loading...
Searching...
No Matches
physx::PxSyncT< Alloc > Class Template Reference

#include <PxSync.h>

Inheritance diagram for physx::PxSyncT< Alloc >:
[legend]
Collaboration diagram for physx::PxSyncT< Alloc >:
[legend]

Public Member Functions

 PxSyncT (const Alloc &alloc=Alloc())
 
bool wait (uint32_t milliseconds=PxSyncImpl::waitForever)
 
void set ()
 
void reset ()
 

Static Public Attributes

static const uint32_t waitForever = PxSyncImpl::waitForever
 

Additional Inherited Members

- Protected Member Functions inherited from physx::PxReflectionAllocator< T >
 PxReflectionAllocator (const PxEMPTY)
 
 PxReflectionAllocator (const char *=0)
 
 PxReflectionAllocator (const PxReflectionAllocator &)
 
PX_FORCE_INLINE void * allocate (size_t size, const char *filename, int line)
 
PX_FORCE_INLINE void deallocate (void *ptr)
 

Detailed Description

template<typename Alloc = PxReflectionAllocator<PxSyncImpl>>
class physx::PxSyncT< Alloc >

Implementation notes:

  • Calling set() on an already signaled Sync does not change its state.
  • Calling reset() on an already reset Sync does not change its state.
  • Calling set() on a reset Sync wakes all waiting threads (potential for thread contention).
  • Calling wait() on an already signaled Sync will return true immediately.
  • NOTE: be careful when pulsing an event with set() followed by reset(), because a thread that is not waiting on the event will miss the signal.

Member Function Documentation

◆ reset()

template<typename Alloc = PxReflectionAllocator<PxSyncImpl>>
void physx::PxSyncT< Alloc >::reset ( )
inline

Reset the synchronization object

◆ set()

template<typename Alloc = PxReflectionAllocator<PxSyncImpl>>
void physx::PxSyncT< Alloc >::set ( )
inline

Signal the synchronization object, waking all threads waiting on it

◆ wait()

template<typename Alloc = PxReflectionAllocator<PxSyncImpl>>
bool physx::PxSyncT< Alloc >::wait ( uint32_t  milliseconds = PxSyncImpl::waitForever)
inline

Wait on the object for at most the given number of ms. Returns true if the object is signaled. Sync::waitForever will block forever or until the object is signaled.


The documentation for this class was generated from the following file: