自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

阻塞隊列—PriorityBlockingQueue源碼分析

開發(fā) 前端
PriorityBlockingQueue 優(yōu)先級隊列,線程安全(添加、讀取都進(jìn)行了加鎖)、無界、讀阻塞的隊列,底層采用的堆結(jié)構(gòu)實現(xiàn)(二叉樹),默認(rèn)是小根堆,最小的或者最大的元素會一直置頂,每次獲取都取最頂端的數(shù)據(jù)

 前言


PriorityBlockingQueue 優(yōu)先級隊列,線程安全(添加、讀取都進(jìn)行了加鎖)、無界、讀阻塞的隊列,底層采用的堆結(jié)構(gòu)實現(xiàn)(二叉樹),默認(rèn)是小根堆,最小的或者最大的元素會一直置頂,每次獲取都取最頂端的數(shù)據(jù)

隊列創(chuàng)建

小根堆

  1. PriorityBlockingQueue<Integer> concurrentLinkedQueue = new PriorityBlockingQueue<Integer>(); 

大根堆

  1. PriorityBlockingQueue<Integer> concurrentLinkedQueue = new PriorityBlockingQueue<Integer>(10, new Comparator<Integer>() { 
  2.  @Override 
  3.  public int compare(Integer o1, Integer o2) { 
  4.   return o2 - o1; 
  5.  } 
  6. }); 

 應(yīng)用場景

有任務(wù)要執(zhí)行,可以對任務(wù)加一個優(yōu)先級的權(quán)重,這樣隊列會識別出來,對該任務(wù)優(yōu)先進(jìn)行出隊。

我們來看一個具體例子,例子中定義了一個將要放入“優(yōu)先阻塞隊列”的任務(wù)類,并且定義了一個任務(wù)工場類和一個任務(wù)執(zhí)行類,在任務(wù)工場類中產(chǎn)生了各種不同優(yōu)先級的任務(wù),將其添加到隊列中,在任務(wù)執(zhí)行類中,任務(wù)被一個個取出并執(zhí)行。

  1. package com.niuh.queue.priority; 
  2.  
  3. import java.util.ArrayList; 
  4. import java.util.List; 
  5. import java.util.Queue; 
  6. import java.util.Random; 
  7. import java.util.concurrent.ExecutorService; 
  8. import java.util.concurrent.Executors; 
  9. import java.util.concurrent.PriorityBlockingQueue; 
  10. import java.util.concurrent.TimeUnit; 
  11.  
  12. /** 
  13.  * <p> 
  14.  * PriorityBlockingQueue使用示例 
  15.  * </p> 
  16.  */ 
  17. public class PriorityBlockingQueueDemo { 
  18.  
  19.     public static void main(String[] args) throws Exception { 
  20.         Random random = new Random(47); 
  21.         ExecutorService exec = Executors.newCachedThreadPool(); 
  22.         PriorityBlockingQueue<Runnable> queue = new PriorityBlockingQueue<>(); 
  23.         exec.execute(new PrioritizedTaskProducer(queue, exec)); // 這里需要注意,往PriorityBlockingQueue中添加任務(wù)和取出任務(wù)的 
  24.         exec.execute(new PrioritizedTaskConsumer(queue)); // 步驟是同時進(jìn)行的,因而輸出結(jié)果并不一定是有序的 
  25.     } 
  26.  
  27. class PrioritizedTask implements Runnable, Comparable<PrioritizedTask> { 
  28.     private Random random = new Random(47); 
  29.     private static int counter = 0; 
  30.     private final int id = counter++; 
  31.     private final int priority; 
  32.  
  33.     protected static List<PrioritizedTask> sequence = new ArrayList<>(); 
  34.  
  35.     public PrioritizedTask(int priority) { 
  36.         this.priority = priority; 
  37.         sequence.add(this); 
  38.     } 
  39.  
  40.     @Override 
  41.     public int compareTo(PrioritizedTask o) { 
  42.         return priority < o.priority ? 1 : (priority > o.priority ? -1 : 0);  // 定義優(yōu)先級計算方式 
  43.     } 
  44.  
  45.     @Override 
  46.     public void run() { 
  47.         try { 
  48.             TimeUnit.MILLISECONDS.sleep(random.nextInt(250)); 
  49.         } catch (InterruptedException e) { 
  50.         } 
  51.         System.out.println(this); 
  52.     } 
  53.  
  54.     @Override 
  55.     public String toString() { 
  56.         return String.format("[%1$-3d]", priority) + " Task " + id; 
  57.     } 
  58.  
  59.     public String summary() { 
  60.         return "(" + id + ": " + priority + ")"
  61.     } 
  62.  
  63.     public static class EndSentinel extends PrioritizedTask { 
  64.         private ExecutorService exec
  65.  
  66.         public EndSentinel(ExecutorService exec) { 
  67.             super(-1); 
  68.             this.exec = exec
  69.         } 
  70.  
  71.         @Override 
  72.         public void run() { 
  73.             int count = 0; 
  74.             for (PrioritizedTask pt : sequence) { 
  75.                 System.out.print(pt.summary()); 
  76.                 if (++count % 5 == 0) { 
  77.                     System.out.println(); 
  78.                 } 
  79.             } 
  80.             System.out.println(); 
  81.             System.out.println(this + " Calling shutdownNow()"); 
  82.             exec.shutdownNow(); 
  83.         } 
  84.     } 
  85.  
  86. class PrioritizedTaskProducer implements Runnable { 
  87.     private Random random = new Random(47); 
  88.     private Queue<Runnable> queue; 
  89.     private ExecutorService exec
  90.  
  91.     public PrioritizedTaskProducer(Queue<Runnable> queue, ExecutorService exec) { 
  92.         this.queue = queue; 
  93.         this.exec = exec
  94.     } 
  95.  
  96.     @Override 
  97.     public void run() { 
  98.         for (int i = 0; i < 20; i++) { 
  99.             queue.add(new PrioritizedTask(random.nextInt(10))); // 往PriorityBlockingQueue中添加隨機(jī)優(yōu)先級的任務(wù) 
  100.             Thread.yield(); 
  101.         } 
  102.         try { 
  103.             for (int i = 0; i < 10; i++) { 
  104.                 TimeUnit.MILLISECONDS.sleep(250); 
  105.                 queue.add(new PrioritizedTask(10)); // 往PriorityBlockingQueue中添加優(yōu)先級為10的任務(wù) 
  106.             } 
  107.             for (int i = 0; i < 10; i++) { 
  108.                 queue.add(new PrioritizedTask(i));// 往PriorityBlockingQueue中添加優(yōu)先級為1-10的任務(wù) 
  109.             } 
  110.             queue.add(new PrioritizedTask.EndSentinel(exec)); 
  111.         } catch (InterruptedException e) { 
  112.         } 
  113.         System.out.println("Finished PrioritizedTaskProducer"); 
  114.     } 
  115.  
  116. class PrioritizedTaskConsumer implements Runnable { 
  117.     private PriorityBlockingQueue<Runnable> queue; 
  118.  
  119.     public PrioritizedTaskConsumer(PriorityBlockingQueue<Runnable> queue) { 
  120.         this.queue = queue; 
  121.     } 
  122.  
  123.     @Override 
  124.     public void run() { 
  125.         try { 
  126.             while (!Thread.interrupted()) { 
  127.                 queue.take().run(); // 任務(wù)的消費(fèi)者,從PriorityBlockingQueue中取出任務(wù)執(zhí)行 
  128.             } 
  129.         } catch (InterruptedException e) { 
  130.         } 
  131.         System.out.println("Finished PrioritizedTaskConsumer"); 
  132.     } 

 工作原理

PriorityBlockingQueue 是 JDK1.5 的時候出來的一個阻塞隊列。但是該隊列入隊的時候是不會阻塞的,永遠(yuǎn)會加到隊尾。下面我們介紹下它的幾個特點(diǎn):

  • PriorityBlockingQueue 和 ArrayBlockingQueue 一樣是基于數(shù)組實現(xiàn)的,但后者在初始化時需要指定長度,前者默認(rèn)長度是 11。
  • 該隊列可以說是真正的無界隊列,它在隊列滿的時候會進(jìn)行擴(kuò)容,而前面說的無界阻塞隊列其實都有有界,只是界限太大可以忽略(最大值是 2147483647)
  • 該隊列屬于權(quán)重隊列,可以理解為它可以進(jìn)行排序,但是排序不是從小到大排或從大到小排,是基于數(shù)組的堆結(jié)構(gòu)(具體如何排下面會進(jìn)行分析)
  • 出隊方式和前面的也不同,是根據(jù)權(quán)重來進(jìn)行出隊,和前面所說隊列中那種先進(jìn)先出或者先進(jìn)后出方式不同。
  • 其存入的元素必須實現(xiàn)Comparator,或者在創(chuàng)建隊列的時候自定義Comparator。

注意:

  1. 堆結(jié)構(gòu)實際上是一種完全二叉樹。關(guān)于二叉樹可以查看 《樹、二叉樹、二叉搜索樹的實現(xiàn)和特性》
  2. 堆又分為大頂堆和小頂堆 。大頂堆中第一個元素肯定是所有元素中最大的,小頂堆中第一個元素是所有元素中最小的。關(guān)于二叉堆可以查看《堆和二叉堆的實現(xiàn)和特性》

源碼分析

定義

PriorityBlockingQueue的類繼承關(guān)系如下:

其包含的方法定義如下:

成員屬性

從下面的字段我們可以知道,該隊列可以排序,使用顯示鎖來保證操作的原子性,在空隊列時,出隊線程會堵塞等。 

  1. /** 
  2. * 默認(rèn)數(shù)組長度 
  3. */ 
  4. private static final int DEFAULT_INITIAL_CAPACITY = 11; 
  5.  
  6. /** 
  7.  * 最大達(dá)容量,分配時超出可能會出現(xiàn) OutOfMemoryError 異常 
  8.  */ 
  9. private static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8; 
  10.  
  11. /** 
  12.  * 隊列,存儲我們的元素 
  13.  */ 
  14. private transient Object[] queue; 
  15.  
  16. /** 
  17.  * 隊列長度 
  18.  */ 
  19. private transient int size
  20.  
  21. /** 
  22.  * 比較器,入隊進(jìn)行權(quán)重的比較 
  23.  */ 
  24. private transient Comparator<? super E> comparator; 
  25.  
  26. /** 
  27.  * 顯示鎖 
  28.  */ 
  29. private final ReentrantLock lock; 
  30.  
  31. /** 
  32.  * 空隊列時進(jìn)行線程阻塞的 Condition 對象 
  33.  */ 
  34. private final Condition notEmpty; 

 構(gòu)造函數(shù) 

  1. /** 
  2. * 默認(rèn)構(gòu)造,使用長度為 11 的數(shù)組,比較器為空 
  3. */ 
  4. public PriorityBlockingQueue() { 
  5.     this(DEFAULT_INITIAL_CAPACITY, null); 
  6. /** 
  7. * 自定義數(shù)據(jù)長度構(gòu)造,比較器為空 
  8. */ 
  9. public PriorityBlockingQueue(int initialCapacity) { 
  10.     this(initialCapacity, null); 
  11. /** 
  12. * 自定義數(shù)組長度,可以自定義比較器 
  13. */ 
  14. public PriorityBlockingQueue(int initialCapacity, 
  15.                              Comparator<? super E> comparator) { 
  16.     if (initialCapacity < 1) 
  17.         throw new IllegalArgumentException(); 
  18.     this.lock = new ReentrantLock(); 
  19.     this.notEmpty = lock.newCondition(); 
  20.     this.comparator = comparator; 
  21.     this.queue = new Object[initialCapacity]; 
  22. /** 
  23. * 構(gòu)造函數(shù),帶有初始內(nèi)容的隊列 
  24. */ 
  25. public PriorityBlockingQueue(Collection<? extends E> c) { 
  26.     this.lock = new ReentrantLock(); 
  27.     this.notEmpty = lock.newCondition(); 
  28.     boolean heapify = true; // true if not known to be in heap order 
  29.     boolean screen = true;  // true if must screen for nulls 
  30.     if (c instanceof SortedSet<?>) { 
  31.         SortedSet<? extends E> ss = (SortedSet<? extends E>) c; 
  32.         this.comparator = (Comparator<? super E>) ss.comparator(); 
  33.         heapify = false
  34.     } 
  35.     else if (c instanceof PriorityBlockingQueue<?>) { 
  36.         PriorityBlockingQueue<? extends E> pq = 
  37.             (PriorityBlockingQueue<? extends E>) c; 
  38.         this.comparator = (Comparator<? super E>) pq.comparator(); 
  39.         screen = false
  40.         if (pq.getClass() == PriorityBlockingQueue.class) // exact match 
  41.             heapify = false
  42.     } 
  43.     Object[] a = c.toArray(); 
  44.     int n = a.length; 
  45.     // If c.toArray incorrectly doesn't return Object[], copy it. 
  46.     if (a.getClass() != Object[].class) 
  47.         a = Arrays.copyOf(a, n, Object[].class); 
  48.     if (screen && (n == 1 || this.comparator != null)) { 
  49.         for (int i = 0; i < n; ++i) 
  50.             if (a[i] == null
  51.                 throw new NullPointerException(); 
  52.     } 
  53.     this.queue = a; 
  54.     this.size = n; 
  55.     if (heapify) 
  56.         heapify(); 

 入隊方法

入隊方法,下面可以看到 put 方法最終會調(diào)用 offer 方法,所以我們只看 offer 方法即可。

offer(E e)

  1. public void put(E e) { 
  2.     offer(e); // never need to block 
  3.  
  4. public boolean offer(E e) { 
  5.     //判斷是否為空 
  6.     if (e == null
  7.         throw new NullPointerException(); 
  8.     //顯示鎖 
  9.     final ReentrantLock lock = this.lock; 
  10.     lock.lock(); 
  11.     //定義臨時對象 
  12.     int n, cap; 
  13.     Object[] array; 
  14.     //判斷數(shù)組是否滿了 
  15.     while ((n = size) >= (cap = (array = queue).length)) 
  16.         //數(shù)組擴(kuò)容 
  17.         tryGrow(array, cap); 
  18.     try { 
  19.         //拿到比較器 
  20.         Comparator<? super E> cmp = comparator; 
  21.         //判斷是否有自定義比較器 
  22.         if (cmp == null
  23.             //堆上浮 
  24.             siftUpComparable(n, e, array); 
  25.         else 
  26.             //使用自定義比較器進(jìn)行堆上浮 
  27.             siftUpUsingComparator(n, e, array, cmp); 
  28.         //隊列長度 +1 
  29.         size = n + 1; 
  30.         //喚醒休眠的出隊線程 
  31.         notEmpty.signal(); 
  32.     } finally { 
  33.         //釋放鎖 
  34.         lock.unlock(); 
  35.     } 
  36.     return true

 siftUpComparable(int k, T x, Object[] array)

上浮調(diào)整比較器方法的實現(xiàn)

  1. private static <T> void siftUpComparable(int k, T x, Object[] array) { 
  2.         Comparable<? super T> key = (Comparable<? super T>) x; 
  3.         while (k > 0) { 
  4.          //無符號向左移,目的是找到放入位置的父節(jié)點(diǎn) 
  5.             int parent = (k - 1) >>> 1; 
  6.             //拿到父節(jié)點(diǎn)的值 
  7.             Object e = array[parent]; 
  8.             //比較是否大于該元素,不大于就沒比較交換 
  9.             if (key.compareTo((T) e) >= 0) 
  10.                 break; 
  11.             //以下都是元素位置交換 
  12.             array[k] = e; 
  13.             k = parent; 
  14.         } 
  15.         array[k] = key
  16.     } 

 根據(jù)上面的代碼,可以看出這是完全二叉樹在進(jìn)行上浮調(diào)整。調(diào)整入隊的元素,找出最小的,將元素排列有序化。簡單理解就是:父節(jié)點(diǎn)元素值一定要比它的子節(jié)點(diǎn)得小,如果父節(jié)點(diǎn)大于子節(jié)點(diǎn)了,那就兩者位置進(jìn)行交換。

入隊圖解

例子:85 添加到二叉堆中(大頂堆)

  1. package com.niuh.queue.priority; 
  2.  
  3. import java.util.Comparator; 
  4. import java.util.concurrent.PriorityBlockingQueue; 
  5.  
  6. /** 
  7.  * <p> 
  8.  * PriorityBlockingQueue 簡單演示 demo 
  9.  * </p> 
  10.  */ 
  11. public class TestPriorityBlockingQueue { 
  12.  
  13.     public static void main(String[] args) throws InterruptedException { 
  14.         // 大頂堆 
  15.         PriorityBlockingQueue<Integer> concurrentLinkedQueue = new PriorityBlockingQueue<Integer>(10, new Comparator<Integer>() { 
  16.             @Override 
  17.             public int compare(Integer o1, Integer o2) { 
  18.                 return o2 - o1; 
  19.             } 
  20.         }); 
  21.  
  22.         concurrentLinkedQueue.offer(90); 
  23.         concurrentLinkedQueue.offer(80); 
  24.         concurrentLinkedQueue.offer(70); 
  25.         concurrentLinkedQueue.offer(60); 
  26.         concurrentLinkedQueue.offer(40); 
  27.         concurrentLinkedQueue.offer(30); 
  28.         concurrentLinkedQueue.offer(20); 
  29.         concurrentLinkedQueue.offer(10); 
  30.         concurrentLinkedQueue.offer(50); 
  31.         concurrentLinkedQueue.offer(85); 
  32.         //輸出元素排列 
  33.         concurrentLinkedQueue.stream().forEach(e-> System.out.print(e+"  ")); 
  34.         //取出元素 
  35.         Integer take = concurrentLinkedQueue.take(); 
  36.         System.out.println(); 
  37.         concurrentLinkedQueue.stream().forEach(e-> System.out.print(e+"  ")); 
  38.     } 

 

操作的細(xì)節(jié)分為兩步:

  • 第一步:首先把新元素插入到堆的尾部再說;(新的元素可能是特別大或者特別小,那么要做的一件事情就是重新維護(hù)一下堆的所有元素,把新元素挪到這個堆的相應(yīng)的位置)
  • 第二步:依次向上調(diào)整整個堆的結(jié)構(gòu),就叫 HeapifyUp

  

 85 按照上面講的先插入到堆的尾部,也就是一維數(shù)組的尾部,一維數(shù)組的尾部的話就上圖的位置,因為這是一個完全二叉樹,所以它的尾部就是50后面這個結(jié)點(diǎn)。插進(jìn)來之后這個時候就破壞了堆,它的每一個結(jié)點(diǎn)都要大于它的兒子的這種屬性了,接下來要做的事情就是要把 85 依次地向上浮動,怎么浮動?就是 85 大于它的父親結(jié)點(diǎn),那么就和父親結(jié)點(diǎn)進(jìn)行交換,直到走到根如果大于根的話,就和根也進(jìn)行交換。


85 再繼續(xù)往前走之后,它要和 80 再進(jìn)行比較,同理可得:也就是說這個結(jié)點(diǎn)每次和它的父親比,如果它大于它的父親的話就交換,直到它不再大于它的父親。

 

出隊方法

入隊列的方法說完后,我們來說說出隊列的方法。PriorityBlockingQueue提供了多種出隊操作的實現(xiàn)來滿足不同情況下的需求,如下:

  • E take();
  • E poll();
  • E poll(long timeout, TimeUnit unit);
  • E peek()

poll 和 peek 與上面類似,這里不做說明

take()

出隊方法,該方法會阻塞

  1. public E take() throws InterruptedException { 
  2.  //顯示鎖 
  3.     final ReentrantLock lock = this.lock; 
  4.     //可中斷鎖 
  5.     lock.lockInterruptibly(); 
  6.     //結(jié)果接收對象 
  7.     E result; 
  8.     try { 
  9.      //判斷隊列是否為空 
  10.         while ( (result = dequeue()) == null
  11.          //線程阻塞 
  12.             notEmpty.await(); 
  13.     } finally { 
  14.         lock.unlock(); 
  15.     } 
  16.     return result; 

 dequeue()

我們再來看看具體出隊方法的實現(xiàn),dequeue方法

  1. private E dequeue() { 
  2. //長度減少 1 
  3.    int n = size - 1; 
  4.    //判斷隊列中是否有元素 
  5.    if (n < 0) 
  6.        return null
  7.    else { 
  8.     //隊列對象 
  9.        Object[] array = queue; 
  10.        //取出第一個元素 
  11.        E result = (E) array[0]; 
  12.        //拿出最后一個元素 
  13.        E x = (E) array[n]; 
  14.        //置空 
  15.        array[n] = null
  16.        Comparator<? super E> cmp = comparator; 
  17.        if (cmp == null
  18.         //下沉調(diào)整 
  19.            siftDownComparable(0, x, array, n); 
  20.        else 
  21.            siftDownUsingComparator(0, x, array, n, cmp); 
  22.        //成功則減少隊列中的元素數(shù)量 
  23.        size = n; 
  24.        return result; 
  25.    } 

 總體就是找到父節(jié)點(diǎn)與兩個子節(jié)點(diǎn)中最小的一個節(jié)點(diǎn),然后進(jìn)行交換位置,不斷重復(fù),由上而下的交換。

siftDownComparable(int k, T x, Object[] array, int n)

再來看看下沉比較器方法的實現(xiàn)

  1. private static <T> void siftDownComparable(int k, T x, Object[] array, 
  2.                                                int n) { 
  3.     //判斷隊列長度 
  4.     if (n > 0) { 
  5.         Comparable<? super T> key = (Comparable<? super T>)x; 
  6.         //找到隊列最后一個元素的父節(jié)點(diǎn)的索引。 
  7.         int half = n >>> 1;           // loop while a non-leaf 
  8.         while (k < half) { 
  9.          //拿到 k 節(jié)點(diǎn)下的左子節(jié)點(diǎn) 
  10.             int child = (k << 1) + 1; // assume left child is least 
  11.             //取得子節(jié)點(diǎn)對應(yīng)的值 
  12.             Object c = array[child]; 
  13.             //取得 k 右子節(jié)點(diǎn)的索引 
  14.             int right = child + 1; 
  15.             //比較右節(jié)點(diǎn)的索引是否小于隊列長度和左右子節(jié)點(diǎn)的值進(jìn)行比較 
  16.             if (right < n && 
  17.                 ((Comparable<? super T>) c).compareTo((T) array[right]) > 0) 
  18.                 c = array[child = right]; 
  19.             //比較父節(jié)點(diǎn)值是否大于子節(jié)點(diǎn) 
  20.             if (key.compareTo((T) c) <= 0) 
  21.                 break; 
  22.             //下面都是元素替換 
  23.             array[k] = c; 
  24.             k = child; 
  25.         } 
  26.         array[k] = key
  27.     } 

 出隊圖解

將堆尾元素替換到頂部(即堆頂被替代刪除掉)

依次從根部向下調(diào)整整個堆的結(jié)構(gòu)(一直到堆尾即可) HeapifyDown

例子:90 從二叉堆中刪除(大頂堆)


總結(jié)

PriorityBlockingQueue 真的是個神奇的隊列,可以實現(xiàn)優(yōu)先出隊。最特別的是它只有一個鎖,入隊操作永遠(yuǎn)成功,而出隊只有在空隊列的時候才會進(jìn)行線程阻塞??梢哉f有一定的應(yīng)用場景吧,比如:有任務(wù)要執(zhí)行,可以對任務(wù)加一個優(yōu)先級的權(quán)重,這樣隊列會識別出來,對該任務(wù)優(yōu)先進(jìn)行出隊。

 

責(zé)任編輯:姜華 來源: 今日頭條
相關(guān)推薦

2020-11-25 14:28:56

DelayedWork

2020-11-19 07:41:51

ArrayBlocki

2020-11-20 06:22:02

LinkedBlock

2017-04-12 10:02:21

Java阻塞隊列原理分析

2025-01-14 00:00:00

Blocking隊列元素

2012-06-14 10:34:40

Java阻塞搜索實例

2023-12-28 07:49:11

線程池源碼應(yīng)用場景

2023-12-15 09:45:21

阻塞接口

2025-04-02 01:20:00

阻塞隊列源碼

2022-06-30 08:14:05

Java阻塞隊列

2021-06-04 14:15:10

鴻蒙HarmonyOS應(yīng)用

2024-10-14 12:34:08

2024-02-20 08:16:10

阻塞隊列源碼

2011-03-15 11:33:18

iptables

2021-09-22 14:36:32

鴻蒙HarmonyOS應(yīng)用

2014-08-26 11:11:57

AsyncHttpCl源碼分析

2023-12-05 13:46:09

解密協(xié)程線程隊列

2021-05-12 09:45:20

鴻蒙HarmonyOS應(yīng)用

2011-05-26 10:05:48

MongoDB

2022-06-30 14:31:57

Java阻塞隊列
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號