在访问一个公共的资源时,同步始终是多线程程序不可缺少的部分,日志记录也不例外。
Synchronization has always been an indispensable part of multi-threaded programs while accessing a common resource, and logging is no exception.
和多线程一起使用时,必需使用某种类型的同步。
When used with multiple threads, you must use some type of synchronization.
图 4 显示了同步多线程环境中处理器周期的一个执行示例。
Figure 4 shows a sample execution of processor cycles in a Simultaneous Multi-Threading environment.
应用推荐