【高并发】12 BlockingQueue

    技术2024-11-11  7

    一、介绍

    1、适用于生产者消费者模型

    put take Thread one BlockingQueue Thread two

    2、说明

    Throws ExceptionSpecial VueueBlocksTimes Outinsertadd(o)offer(o)put(o)Removeremove(o)poll()take()Examineelement()peek()

    3、种类

    ArrayBlockingQueue DelayQueue LinkedBlockingQueue PriorityBlockingQueue SynchronousQueue:无界非缓冲的队列
    Processed: 0.044, SQL: 9