Re: How to create threaded ORB under ORBit2



Hi Frank,

Thanks a lot.  But I still can't see the thread active correctly.
Attached is the code I modified from yours for the test.
I simply add a sleep(10)  in both impl_Calculator_sub() and
impl_Calculator_add() of calculator-skelimpl.c just before they return.

I run mt-calculator-server in one terminal and run TWO mt-calculator-client
in TWO terminals.  I found server still can't receive request from two
client concurrently ... server only can response 2nd request after the
1st one return !!


Is this the right behavior ?  If yes, what's good for multi-threaded 
server ?
I'm using RH8.0 (kernel 2.4.18), gcc 3.2, ORBit2-2.4.1.


KC

Frank Rehberger wrote:

>Kuang-Chun Cheng wrote:
>
>  
>
>>Hi,
>>
>>Could someone provide me a simple "Hello" CORBA server
>>to demo how to use threaded ORB under ORBit2.
>>I add
>>
>>if (!g_thread_supported ()) g_thread_init (NULL);
>>
>>in server side and
>>
>>linc_set_threaded (TRUE);
>>
>>in client side just before CORBA_ORB_init() and
>>after CORBA_exception_init(), but nothing work.
>> 
>>
>>    
>>
>please, have a look at
>http://www.gnome.org/projects/ORBit2/orbit-docs/orbit/book1.html
>especially at:
>http://www.gnome.org/projects/ORBit2/orbit-docs/orbit/x1217.html
>
>Regards, Frank
>
>
>_______________________________________________
>orbit-list mailing list
>orbit-list@gnome.org
>http://mail.gnome.org/mailman/listinfo/orbit-list
>  
>





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]