zoukankan      html  css  js  c++  java
  • happen-before原则

    单线程happen-before原则:      在同一个线程中,书写在前面的操作happen-before后面的操作。

    锁的happen-before原则:          同一个锁的unlock操作happen-before此锁的lock操作。

    volatile的happen-before原则:  对一个volatile变量的写操作happen-before对此变量的任意操作(当然也包括写操作了)。

    happen-before的传递性原则:   如果A操作 happen-before B操作,B操作happen-before C操作,那么A操作happen-before C操作。

    线程启动的happen-before原则:同一个线程的start方法happen-before此线程的其它方法。

    线程中断的happen-before原则:对线程interrupt方法的调用happen-before被中断线程的检测到中断发送的代码。

    线程终结的happen-before原则:线程中的所有操作都happen-before线程的终止检测。

    对象创建的happen-before原则:一个对象的初始化完成先于他的finalize方法调用。

  • 相关阅读:
    软件测试面试题(一)
    测试面试题
    测试
    测试理论
    软件测试的认识
    理论知识
    H5页面的测试方式
    mysql数据库,linux,面试理论等
    登录设计点
    ATM境外取款测试点
  • 原文地址:https://www.cnblogs.com/yrjns/p/12151733.html
Copyright © 2011-2022 走看看