Panda3D
Public Member Functions | Static Public Attributes

Mutex Class Reference

A standard mutex, or mutual exclusion lock. More...

#include "pmutex.h"

Inheritance diagram for Mutex:
MutexDirect

List of all members.

Public Member Functions

 Mutex (const char *name)
 Mutex (const string &name)

Static Public Attributes

static Mutex _notify_mutex

Detailed Description

A standard mutex, or mutual exclusion lock.

Only one thread can hold ("lock") a mutex at any given time; other threads trying to grab the mutex will block until the holding thread releases it.

The standard mutex is not reentrant: a thread may not attempt to lock it twice. Although this may happen to work on some platforms (e.g. Win32), it will not work on all platforms; on some platforms, a thread can deadlock itself by attempting to lock the same mutex twice. If your code requires a reentrant mutex, use the ReMutex class instead.

This class inherits its implementation either from MutexDebug or MutexDirect, depending on the definition of DEBUG_THREADS.

Definition at line 44 of file pmutex.h.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations