Only one task may hold the mutex at a time, and only this task can unlock the mutex.
一次只能有一个任务持有互斥锁,并且只有这个任务可以解锁互斥锁。
Fear not, you'll still have access to the raw mongrel request if you want to do fancy stuff like streaming or deferred rendering outside the mutex.
不用害怕,如果您想在互斥以外做一些奇特的事情,比如流处理或延迟呈现,您仍然可以访问原始的mongrel请求。
也叫互斥信号。
The error is not due to the locked mutex.
那个错误不是归咎于被锁定的互斥。
HHandle is the pointer to the mutex handle.
hHandle是指向互斥句柄的指针。
After a mutex is locked, it must be unlocked.
当一个互斥锁被锁定后,它必须被解锁。
Using a mutex ensures that this doesn't happen.
使用互斥对象能够保证这种情形不会发生。
Main thread: Lock mutex and increment threadcount.
主线程:锁定互斥量并增量threadcount。
The function waits until the mutex becomes unlocked.
函数会等待互斥被解锁。
This method allows you to set mutex object attributes.
这个方法允许您设置互斥信号量对象的相关属性。
Listing 3 illustrates a static way of setting a mutex.
清单3介绍了设置互斥的静态方法。
This creates a new mutex and initializes the structure.
这将创建一个新的互斥锁并初始化其结构。
This function gets a pointer to the mutex it is trying to lock.
这个函数会获得一个指向它正在尝试锁定的互斥的指针。
Identifying architecture-specific changes such as mutex locking.
确定特定体系结构的变化,比如互斥锁定(mutex locking)。
Pthread_mutex_lock accepts a single pointer to a mutex to lock.
pthread _ mutex_lock接受一个指向互斥对象的指针作为参数以将其锁定。
Here is another Win32 sample code to acquire mutex between processes.
这里是获得进程间互斥的另一Win32示例代码。
Mutual exclusion can be achieved with the use of a semaphore or mutex.
互斥现象能由使用信号灯或互斥完成。
If the mutex already happens to be locked, the caller will go to sleep.
如果碰巧已经锁定了互斥对象,调用者将进入睡眠状态。
The function returns when the mutex is locked, or if an error occurred.
当互斥被锁定或者发生错误时,函数返回。
The setup for a lock operation involves allocation of a prelocked mutex.
锁定操作的设置涉及分配一个预先锁定的互斥锁。
The mutex object must be declared; once declared, it must be initialized.
互斥量对象必须先被声明;声明后还必须初始化。
If the calling thread has no ownership of this mutex, this function fails.
如果调用线程并不拥有这个互斥信号量,那么这个函数的执行将会失败。
It also checks whether the mutex is unlocked at that time (see Listing 9).
它还会检查互斥在那个时刻是不是解除锁定的(见清单9)。
Another way of setting the mutex kind is by using a mutex attribute object.
设置互斥的另一种方式是使用互斥属性对象。
Uncontested unlock operations return a locked mutex to the thread lock cache.
非争用的解锁操作将一个锁定的互斥锁返回给线程锁定缓存。
This call might fail if the calling thread does not own the mutex object.
如果进行调用的线程并不拥有那个互斥对象,则这个调用可能会失败。
If another thread locks the mutex, the pthread_mutex_trylock will not block.
如果另一个线程锁定了那个互斥,则pthread _ mutex _ trylock将不会阻塞。
You create and initialize a mutex in one operation through the DEFINE_MUTEX macro.
可以通过DEFINE _ mutex宏使用一个操作创建和初始化互斥锁。
So, let's say we go ahead and add a mutex that surrounds the random number generator.
所以,让我们更进一步,在产生随机数的地方加一个互斥量。
Mutexes have names, and only one mutex of a given name can exist on a machine at a time.
互斥有名称,并且,一个给定名称的互斥在同一机器上同一时刻只能存在一个。
应用推荐