做完这些之后,才可以被加锁和解锁。
获得某个资源的专有权的过程称为加锁。
The process of gaining an exclusive right to something is called locking.
我们为多线程程序添加锁。
两个线程不能同时对同一个互斥对象加锁。
No two threads can have the same mutex locked at the same time.
要递增一个加锁的计数器仍然需要编写很多代码!
That's still a lot of code just to increment a counter with a lock held!
考虑使用非阻塞的加锁来观察线程争用。
Consider using nonblocking synchronization routines to monitor contention.
对犹他爵士时的32分更加锁定了这份荣誉。
始终应该尽快对已加锁的互斥对象进行解锁(以提高性能)。
You should always unlock a mutex that you've locked as soon as safely possible (to increase performance).
在重新加锁时,考虑使用版本号来检测状态变更。
When re acquiring locks, consider using generation counts to detect state change.
文件加锁是一个非常棘手的问题,很多时候都存在竞争条件。
File locking is a very tricky issue and race conditions abound.
考虑用内存“退休”法来实现哈希表的按桶加锁。
Consider memory retiring to implement per-chain hash-table locks.
现在我们可以通过敲打屏幕边来重复加锁和解锁计算机屏保的过程。
Now you can repeatedly lock and unlock your computer's screensaver just by knocking on the side of the case. Is this faster or better in any way than setting up a custom key combination?
在SolarisSPARC上,加锁的原子操作可以如下实现。
On Solaris SPARC, atomic operation for locking can be implemented as the following.
数据库中的行是原子单位,可以被当作一个整体进行加锁,读取和修改。
Every row is an atomic unit, to be locked, read, and updated as a whole.
该方法支持多粒度锁、自动加锁特性和自动锁粒度升级特性。
This method supports multiple granularity lock, automatic lock and automatic lock escalation.
“毕加索”字面上看指的是艺术大师毕加索,实际上却和“闭加锁”同音。
The term literally refers to art virtuoso Picasso in Chinese and is pronounced similar to "close and locked" in Chinese.
他们会让你确信,真的有一扇不加锁的门,在等待着你去开启。
Someone who convince you that there really is an unlocked door just waiting for you to open it.
如果跟文件有关的一个进程挂起了,那么这就会使虚拟机不能对该文件加锁。
If a process is hanging around that is holding onto the file, it will prevent the virtual machine from being able to get the lock on the file.
排他锁。除加锁进程外其他进程没有对已加锁文件读写访问权限。
LOCK_EX an exclusive lock. This denies all other processes both read and write access to the file.
看起来我所找到的任何一种所谓的文件加锁的正确指南,之后又都进行了更新。
It seemed that for every guideline I found spelling out the correct way to lock files, a subsequent correction was posted.
简言之,编译在任何情况下都可以按需要正确地加锁和释放的程序通常很困难。
In short, it's often difficult to write a program that correctly, in all circumstances, locks and releases locks as needed.
当你迷失时,小儿美会帮助你找到那扇不加锁的门并在等待着你去开启。
We will help you find an unlocked door which just waiting for you to open it when you lost your way.
因为他的存在,你坚信世界上存在一扇不加锁的门,只是等着你去开启。
Someone who convnces you that there really is an unlocked door just waiting for you to open it.
假设同步使用正确,若线程真正参与争用加锁,您也能感受到同步对实际性能的影响。
Assuming that synchronization is used appropriately, the real performance impact of synchronization is felt when threads actually contend for a lock.
如果出于任何原因不能设置这个加锁,那么其结果会在返回码中反映出来。
If the lock cannot be set for any reason then this would be reflected in the return code.
这些系统对文件进行加锁,这样在某个时间只有一个开发人员对中心仓库具有写入权限。
These systems lock files so that only one developer has write access to the central repository at a time.
当您迷失时,我们会让你确信,真的有一扇不加锁的门,在等待着你去开启。
When you lose your way, we convince you that there really is an unlocked door just waiting for you to open it.
当您迷失时,我们会让你确信,真的有一扇不加锁的门,在等待着你去开启。
When you lose your way, we convince you that there really is an unlocked door just waiting for you to open it.
应用推荐