《Java并发编程实战》 读书勘误

《Java并发编程实战》 个人读书勘误

  • P54

    由于CountingFactorizer的状态就是AtomicLong的状态,而AtomicLong是线程安全的,因此 CountingFactorizer不会对counter的状态施加额外的有效性约束,所以很容易知道CountingFactorizer是线程安全的。

    译文难以理解,原作为

    Since the state of CountingFactorizer is the state of the thread-safe AtomicLong , and since CountingFactorizer imposes no additional validity constraints on the state of the counter, it is easy to see that CountingFactorizer is thread-safe.

    译文的“因此”令人困惑,个人理解应为“并且”,理解起来就是CF类线程安全由于两个方面:1. AtomicLong是线程安全的;2. CF类中没有对counter状态施加额外的有效性约束。

  • P121

    Java.io包中的同步I/O

    和原作出入
    更正:Java.nio

  • P160

    而监听器则根据收到的时间执行一些计算来修改表现对象。

    更正:事件

  • P273-274

    图 15-3 处于稳定状态并包含两个元素的对立
    图 15-4 在插入过程中处于中间状态的对立

    更正:队列

  • P275

    (如果在执行原子更新的同时还要维持现有类的串行化形式,那么原子的域更新器将非常有用。)

    原作:

    The atomic field updaters are also useful when you want to perform atomic updates while preserving the serialized form of an existing class.

    译文的“serialized”被翻译为“串行化”,个人理解应该翻译为“序列化”,理解起来就是想要使用原子更新操作,又想保持现有的类的序列化的形式(比如还保持原生类型的变量)不变,用原子的域更新器非常有用。

你可能感兴趣的:(书籍和源码)