
词语导航
基本信息
词语:互斥使用
繁体:互斥使用
拼音:hù chì shǐ yòng
英语翻译
【计】 exclusive use
分词翻译
互斥的英语翻译:
【计】 mutual exclusive
翻译例句
1. 创建和使用互斥量的过程比仅仅是开始一个线程的过程要稍微复杂一些。
The procedure for creating and using a mutex is a bit more complicated than the procedure for starting a thread.
2. 增强的命令不需要像以前的方法一样使用互斥型锁。
The enhanced commands do not require an exclusive lock like previous methods.
3. 使用互斥对象能够保证这种情形不会发生。
Using a mutex ensures that this doesn"t happen.
4. 可以通过DEFINE _ mutex宏使用一个操作创建和初始化互斥锁。
You create and initialize a mutex in one operation through the DEFINE_MUTEX macro.
5. 另外,您还可以使用“递归”类型的互斥量,这种互斥量允许对同一个互斥量锁定多次。
Otherwise, you can use the "recursive" mutex type, which allows the holder of the lock to lock the same mutex multiple times.
6. 本文是本系列的最后一篇,讨论两个主题:关于实现基于互斥锁的并发链表的设计方法和设计不使用互斥锁的并发数据结构。WWw.weNTIyI.cOM
This article—the concluding part in this series—discusses two things: Design choices for implementing a mutex based concurrent list and designing concurrent data structures without mutexes.
7. 显然,把数据放到队列中就像是把数据添加到列表中,必须使用互斥锁保护这个操作。
Clearly, pushing data into the queue is akin to appending data to the list, and this operation must be guarded by mutex locks.
8. 设置互斥的另一种方式是使用互斥属性对象。
Another way of setting the mutex kind is by using a mutex attribute object.
9. 如前所述,之前所有用于修改媒介首选项的方法都要求对整个文件使用互斥型锁。
As mentioned earlier, all previous mechanisms of changing the media preference required an exclusive lock on the entire file.
10. 互斥现象能由使用信号灯或互斥完成。
Mutual exclusion can be achieved with the use of a semaphore or mutex.
11. 在不只一个线程访问一个互斥的变量时,所有线程都必须使用同步,否则就可能会发生一些非常糟糕的事情。
When more than one thread accesses a mutable variable, all threads must use synchronization, or else some very bad things can happen.
12. 同步的主要方式就是使用synchronized块,它既提供了互斥又提供了可见性保证。
The primary means of synchronization is the use of synchronized blocks, which provide both mutual exclusion and visibility guarantees.
13. 当与互斥一起使用时,pthreads条件变量可以在线程之间提供基于事件的同步机制,不过这是同步的。
When used along with the Mutex, pthreads conditional variables provide event-based synchronization between threads, but they are synchronous.
14. 您还可以使用 pthread_mutex_trylock()来测试某个互斥是否已经被锁定,而不需要真正 地去锁定它。
You can also use the pthread_mutex_trylock() to test whether a mutex is locked without actually blocking it.
15. 现在,有两个线程需要使用这两个互斥量。
Now, imagine that two threads want to use them. Thread one does this.
16. 当不再使用互斥量时,可以调用pthread _ mutex_destroy来释放在初始化过程中分配的资源。
When you"re done with a mutex, you can release any resources allocated during initialization with a call to pthread_mutex_destroy .
17. Linux使用pthread _ mutex_unlock来释放或者解锁互斥(见清单13)。
Linux USES pthread_mutex_unlock to release or unlock the mutex (see Listing 13).
18. 还要注意,两个条件变量使用相同的互斥锁。
Also note that both condition variables use the same mutex.
19. 当启用该级别时,可以使用来自不同级别的不同规则,这些规则本身是互斥的。
It allows you to use different rules from different levels, the rules themselves being mutually exclusive of one another.
20. 如果程序A创建一个互斥,则程序b可以使用同一个互斥。
If Program a creates a mutex, Program B can see that same mutex.
21. 这个坏程序的开发者起初的想法是好的,即只在真正需要使用之前才锁定这些互斥量,但是他却直到运行结束才解锁。
The hapless developer of this monstrosity came up with the clever idea of only locking things when they are actually about to be used, but deferring unlocking until the end of a run.
22. 这个函数会使用一个互斥对象的句柄,并一直等待,直到它变为有信号状态或超时为止。
This function takes the handle to the mutex object and waits until it is signaled or timeout occurs.
23. 因为添加和取出数据操作使用相同的互斥锁,所以读取数据的速度会影响写数据的线程访问锁。
Because you"re sharing the same mutex for push and pop operations, the data-read speed is somewhat compromised as writer threads access the lock.
24. 在内核中可以使用互斥锁来实现信号量行为。
Mutexes are available in the kernel as a way to accomplish semaphore behavior.
25. 如果您创建了一个名为“MyMutex”的互斥,则任何其他程序都不能使用这个名称创建互斥,如下面的清单16和18所示。
If you create a mutex called "My mutex", no other program can create a mutex with that name, as shown in Listings 16 and 18 below.
26. 要释放一个不再需要的互斥信号量对象,可以使用pthread _ mutex_destroy 。
To free a mutex object that is no longer needed, pthread_mutex_destroy is used.
27. 不使用互斥对象时,即使主线程在thread_function线程睡眠一秒钟期间内对myglobal加一,thread_function苏醒后也会覆盖主线程所加的值。
Without the mutex, thread_function will overwrite the incremented value when it wakes up if our main thread increments myglobal during thread_function "s one-second nap.
28. 在需要立即锁定以及希望在互斥锁不可用时掌握控制的情形下,可以使用第一个函数mutex _ trylock。
The first function, mutex_trylock, is used in situations where you want the lock immediately or you want control to be returned to you if the mutex is not available.
29. 用于创建pthread _ mutex的POSIXAPI使用互斥锁来实现优先级继承协议。
A POSIX API for creating a pthread_mutex lets the mutex implement the priority-inheritance protocol.
30. 使用下面的函数解开对互斥的锁定(见清单5)。
A mutex is unlocked with the function (see Listing 5).
版权声明:问题易所有作品(图文、音视频)均来源网络,版权归原创作者所有,与本站立场无关,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理!
