DevOps研发效能
媒体矩阵
开源中国APP
授权协议 未知
开发语言 Java
操作系统 跨平台
软件类型 开源软件
开源组织
地区 不详
投 递 者 红薯
适用人群 未知
收录时间 2009-05-23

软件简介

util.concurrent 是一个 Java 语言的并发开发包,示例代码:

public class Executor
{
    private static Logger logger = Logger.getLogger(Executor.class);
    private static PooledExecutor executor = new PooledExecutor(5);
   
    static {
        executor.setMinimumPoolSize(2);
        executor.setMaximumPoolSize(10);
        executor.setKeepAliveTime(1000 * 60 * 10);
    }
   
    public static void execute(Runnable runnable) {
        try {
            executor.execute(runnable);
        }
        catch (Exception e) {
            logger.error("Exception while running task: " + e, e);
        }
    }
}

展开阅读全文

评论

点击引领话题📣 发布并加入讨论🔥
暂无内容
发表了博客
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
发表了问答
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
暂无内容
0 评论
26 收藏
分享
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部