<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
    主站蜘蛛池模板: 1000部拍拍拍18勿入免费视频下载 | 99久热只有精品视频免费观看17 | 国产成A人亚洲精V品无码 | 99久久成人国产精品免费| 亚洲情a成黄在线观看| 一级毛片正片免费视频手机看| 国产成人免费全部网站| 美女的胸又黄又www网站免费| 日本成人免费在线| 美女一级毛片免费观看| 一本色道久久综合亚洲精品高清| 一级一看免费完整版毛片| 亚洲日韩精品A∨片无码| 香蕉免费一区二区三区| 亚洲精品永久www忘忧草| 中国在线观看免费高清完整版| 一区二区亚洲精品精华液 | 亚洲AV午夜成人片| 亚洲免费在线视频| 亚洲五月综合网色九月色| 免费无码又爽又刺激毛片| 一区二区三区免费电影| 亚洲国产女人aaa毛片在线| 成人免费在线看片| 国产成人综合亚洲一区| 不卡一卡二卡三亚洲| 少妇太爽了在线观看免费视频| 亚洲嫩草影院在线观看| 国产免费av一区二区三区| 丁香花在线视频观看免费 | 一区二区免费国产在线观看 | 综合亚洲伊人午夜网| 日韩午夜理论免费TV影院| 亚洲AV成人影视在线观看| 免费无遮挡无码永久在线观看视频| 成人a毛片视频免费看| 久久综合九九亚洲一区| 在线免费观看一级毛片| 两性色午夜视频免费网| 亚洲熟女精品中文字幕| 亚洲精品乱码久久久久久按摩 |