aspose file tools*
The moose likes Threads and Synchronization and the fly likes Producer/Consumer using SwingWorker Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Producer/Consumer using SwingWorker " Watch "Producer/Consumer using SwingWorker " New topic
Author

Producer/Consumer using SwingWorker

Benoit Aumars
Greenhorn

Joined: Aug 15, 2001
Posts: 2
Hi all,
Questions about Thread.
Does anybody can help me regarding Producer/Consumer using SwingWorker ?
Here is the background.
I'm developing a Java program, Swing based, which :
a). check every, say, 30 sec if a file within a directory exists
b). if exists, the process it ( this could be time-consuming task ).
c). run a query every, say, 60 sec ( this could be time-consuming task
).
d). process the result set ( this could be time-consuming task ).
Given that scenario, I think the concept of Producer/Consumer fit.
The Producers are a) and c), and the Consumers are b) and d).
My problem is how implement the SwingWorker for Producer/Consumer ?
Or is there any other approach ( with a sample code ) ?
Any comments would be appreciated.
Thanks,
Benoit.
 
jQuery in Action, 2nd edition
 
subject: Producer/Consumer using SwingWorker