小客户大多在做错单时喜欢锁单,即用一张新的买单或卖单把原来的亏损单锁住。
Most customers in the small mistakes, like single-lock, which USES a new buy or sell orders to the original loss-locked.
完成一个事务的时间(以毫秒计)在单节点上是:常规锁——1877,显式写入锁——1225,而使用“脏接口”的话是181。
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".
为了更加智能化,编译器优化会在单例对象所有域完全初始化前就创建该单例对象(参见《重复检查锁的致命点》)。
To wit, compiler optimizations can make the assignment of the new singleton object before all its fields are initialized. (See "Double-checked locking is broken" in Resources.)
应用推荐