573329 members! Sign up to stay informed.

Sponsored Links


Resources

Enterprise Java
Research Library

Get Java white papers, product information, case studies and webcasts

Blogs Blogs Blogs Messages: 0 Messages: 0 Messages: 0 Printer friendly Printer friendly Printer friendly Post reply Post reply Post reply XML XML XML

Extending Concurrency

Posted by: Kirk Pepperdine on Fri Feb 02 01:51:49 EST 2007 DIGG
In his blog. Peter Veentjer describes some of the work that he is doing to extend the new concurrency library. The blog expands on his implementation of a thread synchronization class he calls WaitPoint.

One of the things that annoyed me, while implementing this library, is that I had to reimplement waiting logic: making the ThreadPoolRepeater and ThreadPoolBlockingExecutor pausible for example. Finally it occurred to me, I needed a structure, threads can wait on: the WaitPoint. The WaitPoint is nothing more than a synchronization structure a Thread needs to pass to continue:

The idea, as Peter explains it, is to create synchronization points that can be open or closed. Open wait points allow threads to pass through, where as closed, will force thread to wait until the synchronization point is opened.

Using this new class, he goes on to describe an implementation of a BlockingQueue where you can have much finer control over the flow through the queue.

all puts go through a front-waitpoint and all takes go through a back-waitpoint

This design allows one to stop thread from performing puts or takes. So one can either clear a queue or stop execution. In a follow on thought, Peter is thinking about how this technique could be used to regulate capacity.
Featured SectionFeatured SectionFeatured Section
Weekly Blogs UpdateWeekly Blogs UpdateWeekly Blogs Update
Stay current on the most informative blogs in the enterprise Java community. Join TheServerSide.com and sign up for the Blogs Update. Let TheServerSide.com do the work for you -- we scan thousands of blogs to find the ones most worthy of your attention.
Featured BlogsFeatured BlogsFeatured Blogs

Optimizing CMP Performance in Weblogic with Long-term Caching

Dmitri Maximovich has written a blog on optimizing CMP EJB performance in WebLogic, by addressing optimistic concurrency, along with some of the implications of doing so.

Using Lucene with OJB

Brian McCallister looks at the Lucene search engine and shows us how to index and retrieve objects from a sample Student application.

JDK 5 in Practice

Cedric Beust has been in a position to actually code with JDK 5 for over six months. He has written up his thoughts on the new features, and how he has found them to be in practice.

Dear Manager, They Need a Build Machine

Mike Clark has started a series of entries of letters that you wish you could write to your boss. It consists of concepts which seem so obvious to us, but which the bosses don't get.

Are we doing OR mapping wrong?

Brian McCallister has been playing with JDO 2 fetch groups, ZODB, thinking about TranQL, playing with Prevayler, and looking at TORPEDO.

Fear and Testing

Frank talks about fear and how it can derail efforts to find and solve scalability and performance problems. He has seen a lot of fear on his various engagements, and here he talks about why, and how.

Components, Design, and Functions

Brian McCallister has kindly rambled on about IoC, and design in web applications. He discusses what has worked well for him (and others) in the last year.

JDK 1.5 from Joshua and Neal

Matt Raible went to the Denver JUG meeting with Neal Gafter, and Joshua Bloch. They discussed the new features of Java 5, and Matt details the features, and when to use them.
Featured Blogs Archive

News | Blogs | Discussions | Tech talks | Patterns | Reviews | White Papers | Downloads | Articles | Media kit | About
All Content Copyright ©2007 TheServerSide Privacy Policy