Mutex

class neko.vm.MutexAvailable in nekoA mutex can be used to allow only one thread at a time to execute a block of code. Usually that code operates on shared data. function new() : Void function acquire() : VoidThe calling thread locks the mutex. If another thread has already locked the mutex, the calling thread will block until it is released. A thread can acquire a mutex it already has, but will have to release it twice as well. function release() : VoidThe calling thread releases its lock on the mutex, allowing another thread to acquire it. If there are multiple threads blocking, only one will acquire the lock; the others will continue blocking. function tryAcquire() : BoolIf the mutex is not locked, the calling thread locks it and returns true. If the mutex is locked, the calling thread returns false immediately.
version #4685, modified 2008-10-11 02:51:05 by ianxm