--用wait notifyall來實作生産者與消費者模式,如下 --用blockingdeque來實作生産者與消費者模式,如下 一:用executor來實作生産者與消費者模式,如下 總結:我們可以看到,代碼在一步步的精簡,且更優雅。