<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Swing versus SWT Thread Confinement</title>
	<atom:link href="http://concurrency.wordpress.com/2007/04/24/swing-versus-swt-thread-confinement/feed/" rel="self" type="application/rss+xml" />
	<link>http://concurrency.wordpress.com/2007/04/24/swing-versus-swt-thread-confinement/</link>
	<description>The OCI "Java Concurrency in Practice" Study Group</description>
	<lastBuildDate>Wed, 02 May 2007 02:26:12 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: M Easter</title>
		<link>http://concurrency.wordpress.com/2007/04/24/swing-versus-swt-thread-confinement/#comment-8</link>
		<dc:creator>M Easter</dc:creator>
		<pubDate>Wed, 02 May 2007 02:26:12 +0000</pubDate>
		<guid isPermaLink="false">http://concurrency.wordpress.com/2007/04/24/swing-versus-swt-thread-confinement/#comment-8</guid>
		<description>When I saw a concurrency presentation by Eric B, I had a thought that was somewhat similar to this.  It was a personal light-bulb for me at the time.  Let&#039;s see if I can recapture the gist of it.

Java 5 has powerful concurrency features, and certainly the &quot;synchronized&quot;/monitor pattern has been a big success as a language keyword.  And yet there seems to be very little _in the language_ to help us distinguish a program that is thread-safe/correct from one that is reckless.

Consider the basics of OO design: Java has many ways of conveying _intent_ when it comes to inheritence, polymorphism, generics, etc etc.

Admittedly, OO design is probably vastly &quot;easier&quot; to describe syntactically than concurrency. _But_ what if we go beyond Swing and simply consider the problem of communicating the &quot;threading intent&quot; to another user and/or the compiler? (For example the contractual aspects of an interface from a concurrency standpoint.  I&#039;m thinking of copy-on-write/ownership/etc policies for objects).

I hadn&#039;t gotten there yet but almost certainly the answer, if there is one, lies in annotations.  I think the Swing idea above is one example of what I had been trying to get at.

My question: is there any academic research in this area?  Are there any other languages that can act as a model?  I remember long ago it seemed like everyone would mention Eiffel when it came to (a) design by contract and (b) exception handling (not sure on the latter).   Which language is king of concurrency?

Maybe Java is the leader in this space.  There are a lot of threading problems in various Java/Swing programs but that is almost a testament to the success of the design.   Poorly written multi-threaded programs in C/C++ won&#039;t run long enough for people to complain about them.</description>
		<content:encoded><![CDATA[<p>When I saw a concurrency presentation by Eric B, I had a thought that was somewhat similar to this.  It was a personal light-bulb for me at the time.  Let&#8217;s see if I can recapture the gist of it.</p>
<p>Java 5 has powerful concurrency features, and certainly the &#8220;synchronized&#8221;/monitor pattern has been a big success as a language keyword.  And yet there seems to be very little _in the language_ to help us distinguish a program that is thread-safe/correct from one that is reckless.</p>
<p>Consider the basics of OO design: Java has many ways of conveying _intent_ when it comes to inheritence, polymorphism, generics, etc etc.</p>
<p>Admittedly, OO design is probably vastly &#8220;easier&#8221; to describe syntactically than concurrency. _But_ what if we go beyond Swing and simply consider the problem of communicating the &#8220;threading intent&#8221; to another user and/or the compiler? (For example the contractual aspects of an interface from a concurrency standpoint.  I&#8217;m thinking of copy-on-write/ownership/etc policies for objects).</p>
<p>I hadn&#8217;t gotten there yet but almost certainly the answer, if there is one, lies in annotations.  I think the Swing idea above is one example of what I had been trying to get at.</p>
<p>My question: is there any academic research in this area?  Are there any other languages that can act as a model?  I remember long ago it seemed like everyone would mention Eiffel when it came to (a) design by contract and (b) exception handling (not sure on the latter).   Which language is king of concurrency?</p>
<p>Maybe Java is the leader in this space.  There are a lot of threading problems in various Java/Swing programs but that is almost a testament to the success of the design.   Poorly written multi-threaded programs in C/C++ won&#8217;t run long enough for people to complain about them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curt Cox</title>
		<link>http://concurrency.wordpress.com/2007/04/24/swing-versus-swt-thread-confinement/#comment-7</link>
		<dc:creator>Curt Cox</dc:creator>
		<pubDate>Thu, 26 Apr 2007 15:00:41 +0000</pubDate>
		<guid isPermaLink="false">http://concurrency.wordpress.com/2007/04/24/swing-versus-swt-thread-confinement/#comment-7</guid>
		<description>EDT Annotation.

Relevant thread:
http://forums.java.net/jive/thread.jspa?messageID=139049&amp;tstart=0

Relevant JSR
http://jcp.org/en/jsr/detail?id=305

Discussion Group for JSR
http://groups.google.com/group/jsr-305?hl=en</description>
		<content:encoded><![CDATA[<p>EDT Annotation.</p>
<p>Relevant thread:<br />
<a href="http://forums.java.net/jive/thread.jspa?messageID=139049&amp;tstart=0" rel="nofollow">http://forums.java.net/jive/thread.jspa?messageID=139049&amp;tstart=0</a></p>
<p>Relevant JSR<br />
<a href="http://jcp.org/en/jsr/detail?id=305" rel="nofollow">http://jcp.org/en/jsr/detail?id=305</a></p>
<p>Discussion Group for JSR<br />
<a href="http://groups.google.com/group/jsr-305?hl=en" rel="nofollow">http://groups.google.com/group/jsr-305?hl=en</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vivek Prahlad</title>
		<link>http://concurrency.wordpress.com/2007/04/24/swing-versus-swt-thread-confinement/#comment-6</link>
		<dc:creator>Vivek Prahlad</dc:creator>
		<pubDate>Thu, 26 Apr 2007 03:52:33 +0000</pubDate>
		<guid isPermaLink="false">http://concurrency.wordpress.com/2007/04/24/swing-versus-swt-thread-confinement/#comment-6</guid>
		<description>The simplest approach would actually be the ThreadCheckingRepaintManager that Marco&#039;s mentioned - both the two other proposals are perhaps a bit too invasive. The spin 
project on sourceforge has a pretty nice implementation of a checking repaint manager - when violations are detected, it creates a filtered stacktrace that can help diagnose the exact cause of the problem.</description>
		<content:encoded><![CDATA[<p>The simplest approach would actually be the ThreadCheckingRepaintManager that Marco&#8217;s mentioned &#8211; both the two other proposals are perhaps a bit too invasive. The spin<br />
project on sourceforge has a pretty nice implementation of a checking repaint manager &#8211; when violations are detected, it creates a filtered stacktrace that can help diagnose the exact cause of the problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marco Hunsicker</title>
		<link>http://concurrency.wordpress.com/2007/04/24/swing-versus-swt-thread-confinement/#comment-5</link>
		<dc:creator>Marco Hunsicker</dc:creator>
		<pubDate>Wed, 25 Apr 2007 18:29:47 +0000</pubDate>
		<guid isPermaLink="false">http://concurrency.wordpress.com/2007/04/24/swing-versus-swt-thread-confinement/#comment-5</guid>
		<description>Do you know Scott Delap&#039;s ThreadCheckingRepaintManager? Originally available through http://www.clientjava.com/blog/2004/08/31/1093972473000.html. Derived versions can be found in various FOSS projects. Related blog entry avaliable here: http://weblogs.java.net/blog/alexfromsun/archive/2006/02/debugging_swing.html

The proposed annotation would sure be a good thing, but still require some additional effort to track down violations. Maybe in the future there will be Swing container frameworks available that provide easy to use threading support for Swing developers. It&#039;s not that hard to get it right today, but every little help is a good thing!</description>
		<content:encoded><![CDATA[<p>Do you know Scott Delap&#8217;s ThreadCheckingRepaintManager? Originally available through <a href="http://www.clientjava.com/blog/2004/08/31/1093972473000.html" rel="nofollow">http://www.clientjava.com/blog/2004/08/31/1093972473000.html</a>. Derived versions can be found in various FOSS projects. Related blog entry avaliable here: <a href="http://weblogs.java.net/blog/alexfromsun/archive/2006/02/debugging_swing.html" rel="nofollow">http://weblogs.java.net/blog/alexfromsun/archive/2006/02/debugging_swing.html</a></p>
<p>The proposed annotation would sure be a good thing, but still require some additional effort to track down violations. Maybe in the future there will be Swing container frameworks available that provide easy to use threading support for Swing developers. It&#8217;s not that hard to get it right today, but every little help is a good thing!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Veentjer</title>
		<link>http://concurrency.wordpress.com/2007/04/24/swing-versus-swt-thread-confinement/#comment-4</link>
		<dc:creator>Peter Veentjer</dc:creator>
		<pubDate>Wed, 25 Apr 2007 18:13:58 +0000</pubDate>
		<guid isPermaLink="false">http://concurrency.wordpress.com/2007/04/24/swing-versus-swt-thread-confinement/#comment-4</guid>
		<description>Maybe you could have a look at the following page:

http://weblogs.java.net/blog/alexfromsun/archive/2006/02/debugging_swing.html

A similar solution based on AspectJ</description>
		<content:encoded><![CDATA[<p>Maybe you could have a look at the following page:</p>
<p><a href="http://weblogs.java.net/blog/alexfromsun/archive/2006/02/debugging_swing.html" rel="nofollow">http://weblogs.java.net/blog/alexfromsun/archive/2006/02/debugging_swing.html</a></p>
<p>A similar solution based on AspectJ</p>
]]></content:encoded>
	</item>
</channel>
</rss>
