See what happens? There is no longer one single lock for lookup.
看看会发生什么?查询不止存在一个锁保护。
If you need a lock, keeping it simple, such as using a single lock for nearly everything, has its advantages.
如果您需要一个锁,那么保持其简单性(比如为几乎所有内容都使用惟一的锁)是有好处的。
A special case of the session locking pattern, mentioned above, is the need for a single lock on a set of tables.
如前面所提到的,会话锁定模式中的一个特例是需要对表集合施加单一的锁。
This is also known as "hedging" or "single lock" - the same account opened in the same position more than a single and an empty one.
这也被成为“对冲”或者“锁单”——在同一账户里开设相同头寸的多单和空单。
Single lock refers to the same person in the transaction account, while maintaining the same currency for long positions and short positions.
锁单是指,在交易者的同一账户里,同时保持着同一货币对的多头仓位和空头仓位。
The bigger problem with the synchronized Collections wrappers, and the earlier Hashtable and Vector classes, is that they synchronize on a single lock.
同步的集合包装器以及早期的Hashtable和Vector类带来的更大的问题是,它们在单个的锁上进行同步。
The race conditions illustrated in Listing 1 often make it necessary to hold the single collection lock for much longer than it takes to execute a single operation.
清单1中演示的争用条件常常使得对单个集合的锁在单个操作执行完毕之后还必须继续保持一段较长的时间。
A single arrow indicates a thread contention: One thread is waiting for another thread to release a lock.
一支单独的箭头指出一个线程竞争:一个线程正在等候另一个线程释放一个锁。
The time (microseconds) to perform the transaction for a single node were 1877 with regular locking, 1225 with an explicit write lock, and 181 using a "dirty interface".
完成一个事务的时间(以毫秒计)在单节点上是:常规锁——1877,显式写入锁——1225,而使用“脏接口”的话是181。
Given the single threaded nature of this benchmark, I was fully expecting Escape Analysis to elide the lock thus rendering StringBuffer performance equivalent to that of StringBuilder.
明确了这个基准测试的单线程化的本质后,我期待着逸出分析会消除锁,从而将StringBuffer的性能提到了与StringBuilder相同的水平。
In the case of this single threaded benchmark, it is quite safe for Hotspot to safely elide the lock.
在这个单线程化的基准测试中,Hotspot可以非常安全地将锁省略掉。
The compiler can observe that there is a sequence of adjacent blocks that operate on the same lock, and merge them into a single block.
编译器可以观察到有一个顺序的相邻块对同一个锁进行操作,并会把它们合并到单一块内。
If after replacing these with a single table lock, the MAXLOCKS value is no longer exceeded, lock escalation stops.
如果用一个表锁替换这些行锁,将不再会超出maxlocks值,那么锁升级就会停止。
The previous example showed how to gather information about lock-timeout events for a single workload.
前一个例子演示了如何收集单个工作负载的锁超时事件信息。
Then we can replace all four calls to acquire the lock with a single one that surrounds the entire method body.
然后我们只需执行一次获取锁的操作(为整个方法),而不必像以前一样获取四次锁了。
If only a single type of lock can be associated with the given table, then it may make sense to add extra columns to the original table to control the locking.
如果只有单一类型的锁关联到给定表,那么可以添加额外的列到原始表中来控制锁定。
Having a single thread pool could cause significant lock contention.
使用单独一个线程池可能会导致严重的锁争用。
Even when run with a single thread, the collapsed version was some 30 percent faster: it is much faster to acquire a lock that you already hold than one that nobody holds.
即使只运行一个线程,崩溃版的速度也要快约30%:获取您已占用的锁比获取无人占用的锁要快得多。
Training to improve finger strength, getting better at lock-offs, and even back-stepping (the single most useful technique in all of climbing!
增强指力,更有力的锁住支点,甚至是转身(唯一一个最有用的攀爬技巧!)
This means that multiple threads can access different portions of the Map simultaneously, without contending for the single collection-wide lock.
这意味着多个线程可以同时地访问一个Map的不同部分,而不必争用单个的集合范围的锁。
Pthread_mutex_lock accepts a single pointer to a mutex to lock.
pthread _ mutex_lock接受一个指向互斥对象的指针作为参数以将其锁定。
If you have a single threaded program, you don't need a lock.
如果你有一个单线程程序,您不需要锁。
This situation is equivalent to having acquired the lock: when there is only a single thread, all object accesses are safe.
这种情况等同于已经获取了锁:只有一个线程的时候,所有的对象访问都是安全的。
It is the lightest as execution time, often a lock or unlock becomes just a single inlined assembler instruction.
就运行时间而言是最轻便的,大多数情况下只需要单条内联汇编指令就可以上锁或解锁。
I have students do an electronic code lock, single chip, it should be useful.
我同学做的电子密码锁,单片机的,应该有用。
Accordance with the traditional film printers weakness in locking of laser intensity, a new automatic lock technology based on single chip microcomputer was presented in this paper.
针对激光照排机光强锁定中存在的问题,提出了基于单片微型计算机系统的自动锁定技术。
Mr Lock lists every single application on your phone.
锁先生列出了每一个单一的应用程序在您的手机。
Mr Lock lists every single application on your phone.
锁先生列出了每一个单一的应用程序在您的手机。
应用推荐