aspose file tools
The moose likes Threads and Synchronization and the fly likes Manager / worker / updated data Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "Manager / worker / updated data" Watch "Manager / worker / updated data" New topic
Author

Manager / worker / updated data

John Vorwald
Ranch Hand

Joined: Sep 26, 2010
Posts: 139
I'm trying to learn / understand concurrency threads.
I expect to have a GUI start a SwingWorker, and the SwingWorker manages a number of worker threads, and some data is updated periodically.
I would like the manager to start the workers, then have data appear, then have the data updated after a period.
When the data is updated, I would like to have the workers utilize the new data in a controlled manner.
Also, the manager should be able to interrupt the worker threads.
The following code has minimal synchronization, and I'm not sure it's in the correct places. How should the code be modified so that the workers are notified that the data is being updated, and also so that the workers transition to the new data in a controlled manner.


 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Manager / worker / updated data
 
Similar Threads
Framework for GUI with computationally intensive threads
Converting threadgroup to executorservice
Two questions uppon a deitel's project
Wanted: Java2D example of zooming and panning with scroll bars
Best way to refresh a singleton using synchronization?