|
|
|
|||||
|
I has great interest in ICE. Recently I has read the source code of threadpool.
I find Ice uses leader-follower thread model. There are some critical areas that only one thread can run and Ice uses the "_promote" to control it. Only one thread runs function finished(handle) or message()(at the begin of those functions) can release the "_promote", and another thread can go into the critical area and to epoll other message. But before handler->message(), the thread should execute read(handler); in the function read(handler), the thread must read all bytes of the message, so my question is"If the connection is slow and message body is huge, the thread has to stop at here and the thread don‘t release the "_promote", and other threads have no chance to epoll new data(but can execute the code of object method) 。If the server has a lot of connections, i think it will be a bottleneck“ i'm sorry for my poor english. |
|
|||||
|
Note that in general, explaining Ice internals is out of the scope of the support we can provide here in our forums.[/quote]
thank you for your replying, I just wonder why Ice using blocking reading. your code is smart and i thought when poll's timeout is zero, it would block. |
|
|||||
|
thanks.
i have understood this part code. Ice not using blocking reading。 it is smart code |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| thread pool performance (500+ clients) | Andrew S | Help Center | 6 | 05-11-2008 12:01 PM |
| Disable Server thread pool warning? | spsoni | Help Center | 1 | 03-13-2008 11:26 PM |
| ICE thread pool model under windows | simondu | Comments | 3 | 09-21-2007 07:08 AM |
| monitor util thread block at windows system | Jacky_Lee | Bug Reports | 4 | 06-01-2007 03:10 AM |
| Thread Pool and Network Problems | acbell | Help Center | 4 | 11-10-2006 05:08 PM |