[omniORB] about the multithread in omniORB
Luke Deller
ldeller@xplantechnology.com
Tue Jul 2 01:49:01 2002
Hi Shifeng,
No matter what thread model an ORB uses, you normally do not need to
explicitly create new threads in the servant implementation. The thread
model dictates how the ORB creates threads, not how the programmer needs to
create threads.
Having said that, omniORB3 uses a thread-per request policy: it creates a
thread for each incoming request. OmniORB4 does this too, but it can also
be configured to use a fixed-size thread pool. For info on this, see:
http://omniorb.sourceforge.net/cgi-bin/moin.cgi/OmniOrb4DevelopmentStatus#head-0085ecb47795ed2994a563b95f3a38a21b9313d1
(You can also configure omniORB to be single-threaded, but that is useful
only in special cases).
Regards,
Luke.
zhang ji wrote:
> Hi all,
>
> I have one problem on multithreads support in omniORB.
> Since omniORB support multithread, do we need to
> explicitly to create new thread in the servant
> implementation? In the omniORB call back example the
> server will create one thread when one client
> register.
> If the ORB support thread-per-request, is it OK we can
> directly make the call_back call in the cxx_register
> function without spawning a new thread instead?
>
> And I want to know what the multithread model it used
> in ORB and POA: thread per client(session) or thread
> per request or both? Is there some initialisation
> options to specify the ORB in the thread model when
> ORB start up?
>
> Thanks,
> Shifeng