Vincent.Chan‘s Blog

          常用鏈接

          統(tǒng)計

          積分與排名

          網(wǎng)站

          最新評論

          多線程(2):J2SE 5.0多線程增強(qiáng)簡介

          J2SE 5.0在多線程上做了很大的改進(jìn),提供了更多的API,包括:
          Atomic variables: A set of classes that provide threadsafe operations without synchronization
          Explicit locks: Synchronization locks that can be acquired and released programmatically
          Condition variables: Variables that can be the subject of a targeted notification when certain conditions exist
          Queues: Collection classes that are thread-aware Synchronization primitives: New classes that perform complex types of synchronization
          Thread pools: Classes that can manage a pool of threads to run certain tasks
          Thread schedulers: Classes that can execute tasks at a particular point in time

          在《Java Threads》一書中將其歸納為三類:
          1. 對現(xiàn)有功能的新實現(xiàn);
          2. 提供了重要的多線程工具,如線程池(pool)和計劃(schedule);
          3. 最小化同步工具(Minimal synchronization utilities)。

          這些功能的妙處我現(xiàn)在自然是無法體會得到,但對于JDK 5.0中提供的這些多線程工具,會不會也遭遇JDK 1.4提供的Log API的命運,因敵不過第三方工具而成為擺設(shè)呢(至少目前我還在用Log4J,且其也沒有停止開發(fā)的跡象)?

          posted on 2006-03-09 22:58 Vincent.Chen 閱讀(101) 評論(0)  編輯  收藏 所屬分類: Java

          主站蜘蛛池模板: 巴彦淖尔市| 泽普县| 北宁市| 建湖县| 新蔡县| 阿荣旗| 嘉禾县| 密云县| 灵璧县| 兴仁县| 平乡县| 济宁市| 鲁甸县| 阿瓦提县| 秦皇岛市| 芮城县| 垣曲县| 石屏县| 龙里县| 县级市| 石泉县| 越西县| 永泰县| 苏尼特左旗| 广平县| 贺兰县| 和平县| 武隆县| 长子县| 东阿县| 镇沅| 当涂县| 喀什市| 徐汇区| 万盛区| 大理市| 绵阳市| 马尔康县| 贞丰县| 册亨县| 蓬安县|