<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    ゞ沉默是金ゞ

    魚離不開水,但是沒有說不離開哪滴水.
    posts - 98,comments - 104,trackbacks - 0
    Today in this article we will see some of threads pool available in “Executors” Factory -
    public static ExecutorService 
                             newFixedThreadPool(int nThreads)
        Creates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue. At any point, at most nThreads threads will be active processing tasks. If additional tasks are submitted when all threads are active, they will wait in the queue until a thread is available. If any thread terminates due to a failure during execution prior to shutdown, a new one will take its place if needed to execute subsequent tasks. The threads in the pool will exist until it is explicitly shutdown.

    public static ScheduledExecutorService 
                        newScheduledThreadPool(int corePoolSize)
        Creates a thread pool that can schedule commands to run after a given delay, or to execute periodically.

    public static ExecutorService newCachedThreadPool()
    Creates a thread pool that creates new threads as needed, but will reuse previously constructed threads when they are available. These pools will typically improve the performance of programs that execute many short-lived asynchronous tasks. Calls to execute will reuse previously constructed threads if available. If no existing thread is available, a new thread will be created and added to the pool. Threads that have not been used for sixty seconds are terminated and removed from the cache. Thus, a pool that remains idle for long enough will not consume any resources. Note that pools with similar properties but different details (for example, timeout parameters) may be created using ThreadPoolExecutor constructors.



    public static ExecutorService newSingleThreadExecutor()
        Creates an Executor that uses a single worker thread operating off an unbounded queue. (Note however that if this single thread terminates due to a failure during execution prior to shutdown, a new one will take its place if needed to execute subsequent tasks.) Tasks are guaranteed to execute sequentially, and no more than one task will be active at any given time. Unlike the otherwise equivalent newFixedThreadPool(1) the returned executor is guaranteed not to be reconfigurable to use additional threads.

    public static ExecutorService newSingleThreadExecutor()
        Creates an Executor that uses a single worker thread operating off an unbounded queue. (Note however that if this single thread terminates due to a failure during execution prior to shutdown, a new one will take its place if needed to execute subsequent tasks.) Tasks are guaranteed to execute sequentially, and no more than one task will be active at any given time. Unlike the otherwise equivalent newFixedThreadPool(1) the returned executor is guaranteed not to be reconfigurable to use additional threads.
    posted on 2012-08-06 10:41 ゞ沉默是金ゞ 閱讀(782) 評論(0)  編輯  收藏 所屬分類: Java SE
    主站蜘蛛池模板: 亚洲日本VA午夜在线电影| 午夜免费不卡毛片完整版| 亚洲人成网站日本片| 亚洲伊人久久综合影院| 24小时日本在线www免费的| 一区二区三区在线观看免费| 97se亚洲国产综合自在线| 亚洲国产成人一区二区精品区| 国产精品酒店视频免费看| 99久久免费国产精品特黄| 久久久久久国产精品免费免费男同| 狼人大香伊蕉国产WWW亚洲| 亚洲精品一二三区| 亚洲国产成a人v在线观看 | 亚洲中文字幕乱码熟女在线| 亚洲一区二区中文| 久久久婷婷五月亚洲97号色 | 一级看片免费视频囗交| 色多多www视频在线观看免费| 亚洲aⅴ天堂av天堂无码麻豆 | 亚洲视频免费一区| 亚色九九九全国免费视频| 日本h在线精品免费观看| 精品免费人成视频app| 搡女人免费视频大全| 日韩精品视频免费网址| 亚洲精品无码专区2| 亚洲av永久无码精品国产精品| 亚洲区小说区图片区QVOD| 中文字幕亚洲精品资源网| 久久精品国产99国产精品亚洲 | 国产免费av片在线看| 免费在线观看毛片| 国产亚洲人成无码网在线观看| 亚洲一区二区在线免费观看| 亚洲人成www在线播放| 一个人免费播放在线视频看片| 亚洲免费精彩视频在线观看| 久草在视频免费福利| 国产福利电影一区二区三区,亚洲国模精品一区 | 成人免费乱码大片A毛片|