mutex
常考释义
The slot's connection is checked to see if it is blocked or disconnected, and then the connection's mutex is unlocked.
插槽的连接被检查,看它是否被阻塞或断开,然后,连接的互斥体被解锁。
The name of the system mutex whose access control security rules are to be retrieved.
要检索其访问控制安全性规则的系统mutex的名称。
Then, when a thread is ready to terminate, it locks the mutex, decrements threadcount, and unlocks the mutex.
当一个线程准备终止时,它再次锁定互斥量,减量threadcount,然后解锁互斥量。
The code between the lock and unlock calls to the mutex, is referred to as the critical section.
在打开和关闭互斥调用之间的代码称为临界域。
Therefore, at the end of it all, you now have two reader threads, both waiting on the condition variable, and the mutex is unlocked.
因此,最后两个读线程都等待条件变量,互斥锁没有被锁住。
If the calling thread has no ownership of this mutex, this function fails.
如果调用线程并不拥有这个互斥信号量,那么这个函数的执行将会失败。
As you can see, pthread_mutex_init accepts a pointer to an already-allocated region of memory to initialize as a mutex.
正如所示,pthread_mutex_init接受一个指针作为参数以初始化为互斥对象,该指针指向一块已分配好的内存区。
Mutual exclusion (most often referred to as mutex) allows the programmer to "attach" locks to resources.
互斥(通常被称为mutex)允许编程人员给资源上锁。
A mutex provides exclusive access control for a resource between threads, as shown in.
所示,互斥提供线程间资源的独占访问控制。
It also allows you to unlock the mutex and wait on the condition variable atomically, without the possible intervention of another thread.
它还允许您原子地(atomically)解除互斥的锁定,并等待条件变量,而不会有干涉其他线程的可能。
The constructor and destructor of the queue class are responsible for the creation and destruction of the mutex, as shown in Listing 1.
队列类的构造函数和析构函数负责创建和销毁互斥锁,见清单1。
Mutex objects are synchronization objects that can be owned by only a single thread at a time.
Mutex对象是一次只能为一个线程所拥有的同步对象。
It is a simple lock with only the thread that owns the lock being able to release the mutex.
它是一个简单的锁,只有持有它的线程才可以释放那个互斥。
This function gets a pointer to the mutex it is trying to lock.
这个函数会获得一个指向它正在尝试锁定的互斥的指针。
Class with the specified sections of the access control security rules from the system mutex with the specified name.
使用来自具有指定名称的系统mutex的访问控制安全性规则的指定部分初始化。
A thread holding a mutex can be de-scheduled, perhaps because it was the end of its time-slice.
可能因为分配的时间片结束,持有互斥锁的线程被取消调度。
The mutex API provides five functions: three are used for locking, one for unlocking, and another for testing a mutex.
互斥锁API提供了5个函数:其中3个用于锁定,一个用于解锁,另一个用于测试互斥锁。
A process can specify the name of a mutex object in a call to the OpenMutex or CreateMutex function.
进程可以在OpenMutex函数或CreateMutex函数中指定互斥体对象的名称。
Clearly, pushing data into the queue is akin to appending data to the list, and this operation must be guarded by mutex locks.
显然,把数据放到队列中就像是把数据添加到列表中,必须使用互斥锁保护这个操作。
A far better approach would be to define another method that accepts a list of integers and acquire and release the mutex only once.
更好的做法是定义另一个方法,它接收一系列整数,只获取并释放互斥锁一次。
以上图片仅供学习交流使用,版权归原作者所有,如有侵权,请与我方联系