首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件开发 >

JAVA多线程设计方式五 Producer-Consumer Pattern

2012-07-23 
JAVA多线程设计模式五 Producer-Consumer Pattern中间件!??????public class Main {public static void ma

JAVA多线程设计模式五 Producer-Consumer Pattern

中间件!

?

?

?

?

?

?

public class Main {    public static void main(String[] args) {        Table table = new Table(3);     // 建立可以放置3個蛋糕的桌子        new MakerThread("MakerThread-1", table, 31415).start();        new MakerThread("MakerThread-2", table, 92653).start();        new MakerThread("MakerThread-3", table, 58979).start();        new EaterThread("EaterThread-1", table, 32384).start();        new EaterThread("EaterThread-2", table, 62643).start();        new EaterThread("EaterThread-3", table, 38327).start();    }}

??

?

?

热点排行