aspose 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
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...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Communication between threads