Howdy, So this is kind of like the Sync implementations in Doug Lea's util-concurrent package? (http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/in tro.html) I ask because the above package will be java.util.concurrent in JDK 1.5. So if commons-lang wants to have something similar for earlier JDK versions, it'd be nice if the names matched ;)
Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Sent: Friday, October 17, 2003 10:29 AM >To: Jakarta Commons Developers List >Subject: [lang] or [ThreadPool] contribution: ParalellThreadGuard > >A common problem for networked applications accepting multiple >connections in individual threads that cannot control the >socket accept() paralellity (as the JDK1.4 ORB) need to restrict >the resources somewhere else. > >For this purpose we designed a ParalellThreadGuard class that >can be used as follows: > > private ParalellThreadGuard guard = > new ParalellThreadGuard(THREADS_ACTIVE, THREADS_ENQUEUE, >THREADS_TIMEOUT); >... > public void guardedMethod() throws RejectedException > { > guard.register(); // might throw a RejectedException > try > { > ... // do something with your limited resources here > } > finally > { > guard.release(); > } > } > > >This class seems to fit to the [lang] area, but might also >fit in the scope of the sandboxed [ThreadPool] package. > >I can contribute it to Apache with the proper licence header >if someone sees it fitting. > >Cheers, >Christoph Reck This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]