Re: Adding a timeout to commands by wrapping + thread - suggestions?
- From: Daniel Pitts <googlegroupie@xxxxxxxxxxxxx>
- Date: Fri, 31 Aug 2007 16:18:12 -0000
On Aug 31, 4:35 am, Lew <l...@xxxxxxxxxxxxx> wrote:
dduck wrote:
Comments?
Read /Java Concurrency in Practice/ by Brian Goetz.
I second that. One of the best books I've ever read on any subject in
Java. Well written, easy to read, and very accurate.
Among other things, it's chock-full of idioms for the type of thing you're
trying to do. It will also help you avoid some of the trouble you'll be in.
I'm certainly no expert; this book helps me to realize that.
--
Lew
Also, look into the interface Callable<E>, or Runnable, it does pretty
much what your Command interface does, but its standard. Callable and
Runnable also gives you the option of using Executors, which are
useful for concurrent tasks, and managing timeouts.
Good luck,
Daniel.
.
- References:
- Prev by Date: Re: Read binary data file
- Next by Date: Re: when to use/not use JFrame or Jpanel in Swing or AWT?
- Previous by thread: Re: Adding a timeout to commands by wrapping + thread - suggestions?
- Next by thread: How to read and parse a remote XML file with Java
- Index(es):
Relevant Pages
|