File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes Communication between threads Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Communication between threads" Watch "Communication between threads" New topic
Author

Communication between threads

John Vorwald
Ranch Hand

Joined: Sep 26, 2010
Posts: 139
Hi,
Boy, I'm going to have a tough time asking this question, because I'm not sure what the problem is, or how to make a simple example.
I have a reasonably large program based on a model-view-controller construct, where the models, views, and controller are on different threads.
I have just recently gotten a computationally intensive portion of the code working with multiple treads using ExecutorCompletionService.
The computationally intensive routines are in the model portion, and during execution communicate progress to the controller / views / other models with a variable fControllers. So there are blocks of code like

I'm wondering, do I need to implement sychronization of fControllers? and how to do it?

John
John Vorwald
Ranch Hand

Joined: Sep 26, 2010
Posts: 139
Never mind with this question. I put in the synchronized block on fControllers, with no change in error. I need to dig deeper to understand the source / cause of the problem.
The code was running in test mode of the computationally intensive multithread potion, and now I've started to use the complete program again, and am getting errors in the view. Possibly I made some change that needs to be accounted for in the view...
 
Don't get me started about those stupid light bulbs.
 
subject: Communication between threads
 
Similar Threads
MVC -2+ views for 1 controller??
Question on MVC object creation
Forwarding data changes in MVC
JList Model Creation / Update
Model View Controller Framework