But while synchronization is primarily a concurrency control mechanism, transactions are primarily an exception-handling mechanism.
但是,当同步主要是并发控制的机制时,则事务主要是处理异常的机制。
While all of the lock acquisitions will be uncontended and therefore fast, the compiler can actually eliminate the synchronization entirely using lock elision.
虽然所有锁的获得都是非竞争的,所以很快,但是编译器实际上可以用锁省略把同步完全清除掉。
Synchronization has always been an indispensable part of multi-threaded programs while accessing a common resource, and logging is no exception.
在访问一个公共的资源时,同步始终是多线程程序不可缺少的部分,日志记录也不例外。
应用推荐