zoukankan      html  css  js  c++  java
  • java学习笔记9.20

    interruptedException:

    http://blog.csdn.net/srzhz/article/details/6804756

    1. 处于sleeping,awaiting,或是倍占用的线程(阻塞状态),中断就会抛出interruptedException:

       但是并没有被职位,而且也不会中断线程,要手动中断

    2.中断时中断标志位置位

    3.非阻塞状态时被中断不会产生interruptedException 

    读写锁(ReentrantReadWriteLock):

    构造锁对象;得到读写锁(readlock()方法);对方法加读写锁

    阻塞队列

    并发容器concurrentHashMap:

    http://www.cnblogs.com/dolphin0520/p/3932905.html

    集合接口:

    Iterator 和 Iterable:

    Iterable接口只有一个方法,产生迭代器类;迭代器类需要在类中自己定义。

    queue继承了cllection接口,collection接口继承了iterable接口。 

  • 相关阅读:
    使用dfs求解全排列
    并查集
    Best Cow Line
    Saruman's Army
    Fence Repair
    Laking Counting
    淘宝商品定向爬取
    爬取股票信息
    python中的正则表达式的使用

  • 原文地址:https://www.cnblogs.com/ChuPengcheng/p/5887747.html
Copyright © 2011-2022 走看看