<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>深蓝的blog &#187; synchronized</title>
	<atom:link href="http://www.lanxinbase.com/?feed=rss2&#038;tag=synchronized" rel="self" type="application/rss+xml" />
	<link>http://www.lanxinbase.com</link>
	<description>记录日常生活</description>
	<lastBuildDate>Sat, 18 Apr 2026 07:10:07 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.3</generator>
	<item>
		<title>java中synchronized与lock的区别</title>
		<link>http://www.lanxinbase.com/?p=2351</link>
		<comments>http://www.lanxinbase.com/?p=2351#comments</comments>
		<pubDate>Fri, 14 Jun 2019 15:43:10 +0000</pubDate>
		<dc:creator><![CDATA[Alan]]></dc:creator>
				<category><![CDATA[1.服务端语言]]></category>
		<category><![CDATA[lock]]></category>
		<category><![CDATA[synchronized]]></category>

		<guid isPermaLink="false">http://www.lanxinbase.com/?p=2351</guid>
		<description><![CDATA[synchronized的缺陷 前面博客有提到过释放对象的锁有两种情况： 程序执行完同步代码块会释放代码块。  [&#8230;]]]></description>
		<wfw:commentRss>http://www.lanxinbase.com/?feed=rss2&#038;p=2351</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>java中的synchronized到底是什么?</title>
		<link>http://www.lanxinbase.com/?p=1082</link>
		<comments>http://www.lanxinbase.com/?p=1082#comments</comments>
		<pubDate>Sun, 05 Jun 2016 12:55:55 +0000</pubDate>
		<dc:creator><![CDATA[Alan]]></dc:creator>
				<category><![CDATA[7.android应用开发]]></category>
		<category><![CDATA[synchronized]]></category>

		<guid isPermaLink="false">http://www.lanxinbase.com/?p=1082</guid>
		<description><![CDATA[Java语言的关键字，当它用来修饰一个方法或者一个代码块的时候，能够保证在同一时刻最多只有一个线程执行该段代码。

     一、当两个并发线程访问同一个对象object中的这个synchronized(this)同步代码块时，一个时间内只能有一个线程得到执行。另一个线程必须等待当前线程执行完这个代码块以后才能执行该代码块。

     二、然而，当一个线程访问object的一个synchronized(this)同步代码块时，另一个线程仍然可以访问该object中的非synchronized(this)同步代码块。

     三、尤其关键的是，当一个线程访问object的一个synchronized(this)同步代码块时，其他线程对object中所有其它synchronized(this)同步代码块的访问将被阻塞。

     四、第三个例子同样适用其它同步代码块。也就是说，当一个线程访问object的一个synchronized(this)同步代码块时，它就获得了这个object的对象锁。结果，其它线程对该object对象所有同步代码部分的访问都被暂时阻塞。]]></description>
		<wfw:commentRss>http://www.lanxinbase.com/?feed=rss2&#038;p=1082</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
