Archived

This forum has been archived. Please start a new discussion on GitHub.

ICe-C# multithreading probleam

I am using your Ice-C#, and I have a problem. I tried to realize a
Consumer-Producer with ICE - where the Buffer is an ICE server.

In my solution when the puffer is full, and the producer sends a new
data, its thread goes to sleep using a Monitor.Wait. Then I realized,
that the consumer call for retrieving a data element is not received
or not executed by the data adapter - so the whole system goes into
a deadlock.

I think it is for the previous producer call is not finished yet, and the object adaptor won't let in a new call. Prevoiusly, I used CORBA for this purpose, and this code was working with CORBA, because every time when a prodecure call happened, the CORBA started a new thread for each call. It is not true with ICE? Or is it a configuration problem? What should I do?

Comments

  • By default, the server-side thread pool in Ice has only one thread. Since you want your server to execute requests in parallel, you must increase the number of threads. You can do this by setting Ice.ThreadPool.Server.Size and Ice.ThreadPool.Server.SizeMax. Please have a look at the Ice manual for more information about these properties.
  • Thansk...

    Thank You for your advice. I will try it.
    It will probably the problem...