Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1517517
  • 博文数量: 399
  • 博客积分: 8508
  • 博客等级: 中将
  • 技术积分: 5302
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-14 09:28
个人简介

能力强的人善于解决问题,有智慧的人善于绕过问题。 区别很微妙,小心谨慎做后者。

文章分类

全部博文(399)

文章存档

2018年(3)

2017年(1)

2016年(1)

2015年(69)

2013年(14)

2012年(17)

2011年(12)

2010年(189)

2009年(93)

发布时间:2015-05-02 16:32:27

public class ConcurrentStack {         AtomicReference top = new AtomicReference();     public void push(E item) {         Node newHead = new Node(item);   .........【阅读全文】

阅读(920) | 评论(0) | 转发(0)

发布时间:2015-05-02 16:28:41

Java 内存模型The JMM defines a partial ordering called happens-before on all actions within the program.The rules for happens-before are:Program order rule. Each action in a thread happens-before every action in that thread that comes later in the program order.Monitor lock rule. A.........【阅读全文】

阅读(1024) | 评论(0) | 转发(0)

发布时间:2015-05-02 15:39:37

并发程序一定避不开以下三个问题:starvation, deadlock, and race conditionsLimitations of the Actor-Based Model The actor-based model makes it easy to program with isolated mutability, but it does have some limitations. Actors run asynchronously but coordinate by passing messages. The unexpe.........【阅读全文】

阅读(4554) | 评论(0) | 转发(0)

发布时间:2015-05-01 19:37:53

1) Determining the Number of Threads 最少最少: Runtime.getRuntime().availableProcessors(); Number of threads = (Number of Available Cores) / (1 - Blocking Coefficient)2) Determining the Number of Par.........【阅读全文】

阅读(913) | 评论(0) | 转发(0)

发布时间:2015-05-01 17:04:32

        public class MyExecutor extends ThreadPoolExecutor {        private ConcurrentHashMap......【阅读全文】

阅读(4976) | 评论(0) | 转发(0)
给主人留下些什么吧!~~

我本痴情2013-12-26 15:33

谢谢你的分享,收益颇多,谢谢

回复  |  举报

shiluodan2013-08-08 20:55

还只是菜鸟,不过还是希望能看到那些很厉害的博文。很感谢你的分享。

回复  |  举报
留言热议
请登录后留言。

登录 注册