[omniORB] A thread problem in OmniORB

Jose Luis Ajuria jlajuria@fatronik.com
Thu, 7 Oct 1999 09:44:55 -0300


Dear list members,

I have a semi-starvation problem with OmniORB 2.7.1 for NT and a 
communication library from us. Please, if you think that this problem is 
solved in 2.8, please let me know.

The CORBA-OmniORB server is conected to a machine using a serial port. 
We have one thread for serial port listening, that is created in the constructor 
of the server implementation object (derived form _sk_...).
In this constructor I create a new thread that communicates with the 
machine for monitoring, using this new thread for output and the previous 
thread for input.
This function works fine most of the times (sometimes it also fails like the 
following one, but very rarely).

The problem comes when I remotely invoke from a client a service of the 
CORBA server that communicates with the machine. As the new CORBA-
service is executed in a new thread, I write in the serial port in this new 
thread and the problem comes in the reading thread, that was created at 
starting the server application. I think that this thread looses priority and 
input from machine becomes slow, and then timeouts occur in 
communication.
Of course I use a Mutex for access to the port and then to block the thread 
that was created in the constructor for monitoring and then avoid output from 
two different points (the service thread and the monitoring thread).

Please, could you help me ?

Thanks in advance,

Jose Luis Ajuria


____________________________________________________________
 ____   ________________ 
|    | |  ___     ____  |    Fatronik System,  S.A.
|    | | |___|   /   /  |
|    | |  ___   /   /   |    Ibaitarte, 1
|    | | |___| /   /    |    P.O. Box 160
|    | |      /   /     |    20870 Elgoibar  (Gipuzkoa)
|    | |      \   \     | 
|    | |       \   \    |    Tel:    34 943  748020
|    | |        \   \   |    Fax:    34 943  743492
|    | |         \___\  |    e-mail: jlajuria@fatronik.com
|____| |________________|    Web:     www.fatronik.com
____________________________________________________________