1

I'm using IIOP.NET to communicate with C++ in C#. Currently C++ calls can happen anytime, since C# Remoting Framework uses its own thread.

I don't want that.

Some other middleware gives me a callback, and I'm only allowed to execute the CORBA functions during this callback (and probably on the same stack, so simply synchronizing threads won't work).

So :

Is there a way to do something like that in C# Remoting :

while(1) {
    processPendingRequests();
}

Instead of Thread.Sleep(Timeout.Infinite)? Or maybe is there another way?

casperOne
  • 73,706
  • 19
  • 184
  • 253
Calvin1602
  • 9,413
  • 2
  • 44
  • 55
  • Have you tried "while(true) { processPendingRequests(); }"? – Smur May 09 '11 at 13:50
  • processPendingRequests() is a name I just made up. The question was : what is the actual name of this function ? – Calvin1602 May 09 '11 at 13:53
  • Oh, I'm sorry. Nevermind my comment then... – Smur May 10 '11 at 17:28
  • 1
    You can create a task queue and put request there. The a new thread will consume the queue and make specific CORBA calls. – Bogdan M. Dec 08 '11 at 13:44
  • I thought about that. But this will require re-implementing all the marshalling/unmarshalling stuff already done by Corba. This also means that each new request will be unmarshalled, re-marshalled, and unmarshalled again. Finally, this ruins all the syncs Corba does for synchronous function calls... – Calvin1602 Dec 08 '11 at 21:27

0 Answers0