Could not access console mutex.
未能访问控制台互斥标志。
The mutex kind can be set in two ways.
可以以两种方式设置互斥的类型。
The problem with a mutex-based approach.
基于互斥锁的方法的问题。
为什么要用互斥对象?
But you can also create a mutex dynamically.
但是还可以动态地创建互斥对象。
互斥我吧!
However, if the mutex is locked this call won't block.
然而,如果互斥对象已锁定,这个调用也不会阻塞。
However, a mutex should accompany each condition variable.
不过,每个条件变量都应该伴有一个互斥。
I would argue that a mutex is probably overkill here.
我认为,一个互斥锁在这里可能是杀鸡用牛刀了。
Also note that both condition variables use the same mutex.
还要注意,两个条件变量使用相同的互斥锁。
This structure can be used to set various mutex attributes.
这个结构可用来设置各种互斥对象属性。
Here is a very good article regarding the Mutex solution.
下面是关于一个非常好的文章互斥的解决方案。
No two threads can have the same mutex locked at the same time.
两个线程不能同时对同一个互斥对象加锁。
If Program a creates a mutex, Program B can see that same mutex.
如果程序A创建一个互斥,则程序b可以使用同一个互斥。
In this model no task currently has ownership of the mutex.
在这个模型中,所有被唤醒的任务都不持有互斥锁。
The mutex is simple, but there are some rules you should remember.
互斥锁很简单,但是有一些规则必须牢记。
The data structure is in effect "frozen" until the mutex is unlocked.
那个数据结构实际上是“冻结”了,直到互斥对象被解锁为止。
In either case, when control is returned, the caller holds the mutex.
无论在哪种情形中,当控制被返回时,调用者将持有互斥锁。
If the mutex is held (locked), then one is returned; otherwise, zero.
如果互斥锁被持有(锁定),那么就会返回1;否则,返回0。
This way, the change to add mutex code only has to happen in one place.
这样做使增加互斥代码时只需要在一个子程序中进行改动。
It would clear the mutex after both coordinates had been processed.
更新线程将在两个坐标全部处理完之后清除互斥体。
Here's the sample code for creating a mutex (see Listings 6 and 7 below).
这里是创建互斥的示例代码(见下面的6和7)。
For example, multiple threads can each have a handle to a mutex object.
比如,多线程的每一个线程可以有一个互斥锁的句柄。
When you call pthread_mutex_trylock() you'll attempt to lock the mutex.
调用 pthread_mutex_trylock() 时将尝试锁定互斥对象。
Difference between Binary Semaphore and Mutex in the toilet key example?
在厕所里重要的例子二进制信号量互斥的区别?
That means that wrapping a mutex around the request is useless overhead.
那就意味着给请求加一个互斥是无用的开销。
If possible, just design your program never to re-lock a mutex it already has.
如果可能,在设计程序时决不要锁定一个已经锁定的互斥量。
Finally, you can check the status of a mutex through a call to mutex_is_locked.
最后,可以通过调用mutex_is_locked检查互斥锁的状态。
If the function succeeds, the return value is a handle to the mutex object.
创建成功之后,返回一个互斥对象句柄。
How to use named mutex to ensure only one instance of the application to run.
如何利用命名互斥对象保证应用程序只有一个实例运行。
应用推荐