zoukankan      html  css  js  c++  java
  • Java并发编程实践16章Java内存模型

    Program order rule.
    Each action in a thread happens-before every action in that thread that comes later in the program order.

    Monitor lock rule.
    An unlock on a monitor lock happens-before every subsequent lock on that same monitor lock.

    Volatile variable rule.
    A write to a volatile field happens-before every subsequent read of that same field.

    Thread start rule.
    A callto Thread.start on a thread happens-before every action in the started thread.

    Thread termination rule. Any action in a thread happens-before any other thread detects that thread has terminated, either by successfully return from Thread.join or by Thread.isAlive returning
    false.

    Interruption rule.
    A thread calling interrupt on another thread happens-before the interrupted thread detects the interrupt (either by having InterruptedException thrown, or invoking isInter-
    rupted or interrupted).

    Finalizer rule. The end of a constructor for an object happens-before the start of the ?nalizer for that object.

    Transitivity.
    If A happens-before B,and B happens-before C, then A happens-before C.

  • 相关阅读:
    C语言文法分析
    词法分析--编程感想
    词法分析(改)
    0916词法分析
    0909关于编译
    python正则表达式
    python除法运算
    python值相等和对象相同
    Java编写程序时要考虑到所有可能的异常
    hadoop 读取文件操作
  • 原文地址:https://www.cnblogs.com/littlesuccess/p/2266511.html
Copyright © 2011-2022 走看看