[mico-devel] Multi threads and single thread help needed.

Rob Ratcliff rrr6399 at futuretek.com
Thu Jan 11 19:02:08 PST 2007


Mark,

Your server could create a custom POA with SINGLE_THREAD_MODEL specified 
for its threading policy. There is also a command line parameter I see 
called "-ORBThreadPerConnection" that might do what you need.

Rob


Mark Richardson wrote:
> Hi, I've been working on a mico project, and I was using mico 2.3.11 
> single thread, and have switched to mico 2.3.12 multi-thread.
>  
> The client has needed multi-thread (even in 2.3.11) - because it has a 
> gui (gtk) event loop and the mico event loop. I got it working on 
> 2.3.11 threads-enabled, and it works on 2.3.12.
>  
> The server was single thread, but now that I have switched to 2.3.12 I 
> have a problem.  The server sends out an object to the client(s), and 
> in this object there is a time value(value is arbitrary depending on 
> the data that the server is processing - not the actual time).  When 
> the server was a single thread, it sent out multiple objects in a time 
> sequential order.  But now that the server is multi-threaded, the 
> objects don't arrive in time order. This is a nice feature - getting 
> objects out as quick as possible, but works against me in this case.
>  
> Is there a way to "force" the exact order for the multi-thread server? 
> I've found that if there is more than one client, the objects end up 
> in time order (due to the time to process).
>  
> Or, is there a way to compile as single threaded with 2.3.12? I don't 
> want to have 2 different versions of mico 2.3.12 - one configured and 
> made normally, and one configured and made with --disable-threads.  I 
> suppose if I have to, then I have to - but I think I'm not doing 
> something right.
>  
> I've thought about making the server a service - with listeners, but I 
> don't think that changes the problem that I have.
>



More information about the Mico-devel mailing list