Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Multithread remote method invocation problem  RSS feed

 
Meir Yan
Ranch Hand
Posts: 599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all
I have simple method that is entry point of CORBA remote invocation method
Inside it I have some kind of Logic I need to perform the this logic is inside method and I like
That each method that performs logic will be executed in its own thread ( from thread pool )
this method also returns parameters by reference back to the server .
here is example:


But the problem I have here that I can get several "RemothMethod" calls
And the returned Parameters can be from the wrong thread call .
My question is how can I force the right thread to return the right parameters to the "RemothMethod" call
 
Henry Wong
author
Sheriff
Posts: 22832
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

But the problem I have here that I can get several "RemothMethod" calls
And the returned Parameters can be from the wrong thread call .
My question is how can I force the right thread to return the right parameters to the "RemothMethod" call


There is no "force" of anything here. In your case, dispatching jobs to the threadpool is not a "fire and forget" action. You dispatching thread has to coordinate (or arrange for coordination) with the threadpool thread to get the results back. It's a synchronization and communication issue.

Henry
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!