1#if !defined(RESIP_THREADIF_HXX)
2#define RESIP_THREADIF_HXX
79 typedef std::thread::id
Id;
107 typedef std::map<DWORD,TlsDestructor *> TlsDestructorMap;
110 static void tlsDestroyAll();
113 static TlsDestructorMap *mTlsDestructors;
115 static Mutex *mTlsDestructorsMutex;
134 TlsDestructorInitializer();
135 ~TlsDestructorInitializer();
137 static unsigned int mInstanceCounter;
139static TlsDestructorInitializer _staticTlsInit;
Handles cross-platform sockets compatibility.
A wrapper class to create and spawn a thread.
static void * tlsGetValue(TlsKey key)
This function follows pthread_getspecific() signature.
void TlsDestructor(void *)
static int tlsKeyCreate(TlsKey &key, TlsDestructor *destructor)
This function follows pthread_key_create() signature.
std::shared_ptr< std::thread > mThreadObj
static int tlsKeyDelete(TlsKey key)
This function follows pthread_key_delete() signature.
static int tlsSetValue(TlsKey key, const void *val)
This function follows pthread_setspecific() signature.
Condition mShutdownCondition
virtual bool waitForShutdown(int ms) const
dcm! – add UnusedChecking(_enum) below;
std::mutex Mutex
A semaphore that can be locked by only one thread at a time.
std::condition_variable Condition
A condition variable that can be signaled or waited on, wraps POSIX/Windows implementations depending...