【LinkedBlockingQueue的API】 1.offer(添加数据) 2.isEmpty+ drainTo(批量消费) 3.poll 4.take
最佳实践:packageorg.example;importjava.util.concurrent.BlockingQueue;importjava.util.concurrent.LinkedBlockingQueue;importjava.util.concurrent.TimeUnit;publicclasstestLinkedBlockingQueue{publicstaticvoidm