<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_在路上的牛</title><subtitle type="text">永远在路上......</subtitle><id>http://feed.cnblogs.com/blog/u/34927/rss</id><updated>2011-06-15T12:11:23Z</updated><author><name>在路上的牛</name><uri>http://www.cnblogs.com/liaofan/</uri></author><generator>CNBlogs BlogServer</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liaofan/"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/34927/rss"/><entry><id>http://www.cnblogs.com/liaofan/archive/2008/12/02/1345316.html</id><title type="text">谈谈多线程编程（二）- 不变对象</title><summary type="text">不变对象是指对象的状态在构造后不可改变。这从根本上消除了线程间同步的需求，与锁或者阻塞策略不同的是，不变对象对运行时和设计时不会带来任何额外的开销，因此不变对象是多线程编程中一个很基本的策略。</summary><published>2008-12-02T02:13:00Z</published><updated>2008-12-02T02:13:00Z</updated><author><name>在路上的牛</name><uri>http://www.cnblogs.com/liaofan/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liaofan/archive/2008/12/02/1345316.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liaofan/archive/2008/12/02/1345316.html"/></entry><entry><id>http://www.cnblogs.com/liaofan/archive/2008/12/01/1343357.html</id><title type="text">谈谈多线程编程（一）- 安全性策略</title><summary type="text">在多线程编程中，安全是我们考虑的最重要的因素。通常程序员都会使用锁来满足安全要求，但是只用锁并不能写出良好的多线程代码，因此我们有必要更深入一点，对线程安全策略进行更加全面的了解。首先谈谈影响线程安全的因素：影响线程安全的因素有三个因素影响到了多线程下的安全性：原子性、可见性和指令顺序 一个原子操作是单独的、不可分割的。但是高级语言中的大多数语句，包括一些简单的读写语句，都不具有原子性，最常见的例...</summary><published>2008-12-01T10:51:00Z</published><updated>2008-12-01T10:51:00Z</updated><author><name>在路上的牛</name><uri>http://www.cnblogs.com/liaofan/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liaofan/archive/2008/12/01/1343357.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liaofan/archive/2008/12/01/1343357.html"/></entry><entry><id>http://www.cnblogs.com/liaofan/archive/2008/11/28/1341681.html</id><title type="text">对并发/并行编程的总结</title><summary type="text">1. 并发和并行：一个好的并发算法未必是一个好的并行算法2. 并发编程的2个设计要点：安全和性能，在多CPU环境下还要考虑可扩展性3. 安全性：&amp;#160; &amp;#160; a. 最常见的方法是要求对象在任意时刻都应该满足一致的状态（不变约束）&amp;#160; &amp;#160; b. 在某些无阻塞算法中，允许对象暂时处于不一致状态，但是应该在运行中检测并立刻修正它4. 影响安全的因素：原子性、可见性和指令顺...</summary><published>2008-11-28T02:29:00Z</published><updated>2008-11-28T02:29:00Z</updated><author><name>在路上的牛</name><uri>http://www.cnblogs.com/liaofan/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liaofan/archive/2008/11/28/1341681.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liaofan/archive/2008/11/28/1341681.html"/></entry><entry><id>http://www.cnblogs.com/liaofan/archive/2008/11/24/1340141.html</id><title type="text">使用CAS来实现个单例模式</title><summary type="text">在学习Java并发编程的时候看到了单例的讨论，发现CAS挺适应这个场合的，于是顺手写了个简单的，实现了延迟实例化和多线程安全，也算是无锁的一种用法吧：[代码]&amp;#160;&amp;#160;</summary><published>2008-11-24T10:59:00Z</published><updated>2008-11-24T10:59:00Z</updated><author><name>在路上的牛</name><uri>http://www.cnblogs.com/liaofan/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liaofan/archive/2008/11/24/1340141.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liaofan/archive/2008/11/24/1340141.html"/></entry><entry><id>http://www.cnblogs.com/liaofan/archive/2008/11/20/1337888.html</id><title type="text">基于无锁的C#并发队列实现</title><summary type="text">在多核时代，无锁编程是一种重要的并发编程方法，这里提供了一个C#实现的无锁并发队列，基于Michael-Scott算法。</summary><published>2008-11-20T10:32:00Z</published><updated>2008-11-20T10:32:00Z</updated><author><name>在路上的牛</name><uri>http://www.cnblogs.com/liaofan/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liaofan/archive/2008/11/20/1337888.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liaofan/archive/2008/11/20/1337888.html"/></entry><entry><id>http://www.cnblogs.com/liaofan/archive/2008/03/24/1120130.html</id><title type="text">C#3.0中的“多重继承”</title><summary type="text">    C#不支持多继承，只支持多接口实现，这在某些情况下带来了一些不便。现在在C#3.0中，我们可以利用C#3.0的扩展方法来实现一个“受限的多继承”。&#xD;   C#3.0中引入了扩展方法，可以利用一个静态类的静态方法为一个类或者接口添加方法，关键是：添加的方法是包含实现的，由此我们可以在C#3.0中为接口提供一个带实现的方法声明，而无需额外的实现类。如果一个类实现了多个这样的接口，就可以达到类似多继承的效果。&#xD;</summary><published>2008-03-24T11:48:00Z</published><updated>2008-03-24T11:48:00Z</updated><author><name>在路上的牛</name><uri>http://www.cnblogs.com/liaofan/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liaofan/archive/2008/03/24/1120130.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liaofan/archive/2008/03/24/1120130.html"/></entry></feed>
