Class: glfwmutex

GLFW Documentation: Mutexes are used to securely share data between threads. A mutex object can only be owned by one thread at a time. If more than one thread requires access to a mutex object, all but one thread will be put to sleep until they get access to it.

Hierarchy

o-+ thread
  o-+ glfwmutex

Interfaces:

Methods:

Method overview:


new ()
returns: ([glfwmutex])
Threadsafe
creates a new mutexobject and returns the new mutex or nothing if a mutex couldn't be created
delete (glfwmutex,[boolean lock])
returns: ()
Threadsafe
deletes a mutex. If lock is true (default=false), the mutex is locked before delting the mutex.
islocked (glfwmutex)
returns: ([boolean/glfwthread])
Threadsafe
Checks if the mutex is locked. Returns false if not, returns true if locked but by unknown thread (maybe got destroyed or killed), or the locking thread.
lock (glfwmutex)
returns: ()
Threadsafe
Locks the mutex. When function returns, the mutex has been locked successfully or the mutex has been deleted
unlock (glfwmutex)
returns: ()
Threadsafe
unlocks the mutex, allows any other thread to use it.

Inherited Methods: