[omniORB] Condition Variables on NT and Linux

Ole Storm storm@ifad.dk
Wed, 20 Jan 1999 15:45:55 +0100


Greetings all,

I am using omniORB 2.6.1 on Windows NT 4.0 and on Linux. 

I am experiencing some troubles with condition variables which I am using in
the following way:

Client applications and my server application synchronize at certain points
using a condition variable. I.e. if some data (a list of events in this
case) is not available at the time of request, the client thread is set to
wait by a call to wait() on a global omni_condition variable held by the
server. When the server provides the data all waiting clients are awakened
by calling broadcast() on the condition variable.
It should be noted that the client and server are running in separate
processes.

Problem 1:
On WindowsNT the client threads are apparently never awakened by the call to
broadcast(). On Linux things works OK - waiting clients are actually
awakened.
In the mailing list-archive I have seen this problem described in articles:

http://www.orl.co.uk:80/omniORB/archives/1998-07/0076.html
http://www.orl.co.uk:80/omniORB/archives/1998-04/0116.html

however, I thought that this problem was already fixed in omniORB 2.6.1


Problem 2:
On Linux I experience a minor problem too. If, at some point in time, two
clients have been waiting on the same condition variable, and then at a
later point in time one of the two clients terminate execution (it is
terminated nicely, i.e. it is not interrupted while waiting!), then later
calls to broadcast() fails to awaken the remaining client. The client is not
awakened until a second client thread is started and set to wait on the
condition variable. It seems that broadcast() can not handle if the number
of clients using a condition variable is decreased at some point in time. 

It should be noted that I have compiled omniORB 2.6.1 with egcs1.1.1


Any ideas as to what I may be doing wrong???


Best regards,

	Ole.

---------------------------------------------------------------
Ole Storm
The Institute of Applied Computer Science (IFAD)
Forskerparken 10, DK-5230 Odense M, Denmark
Phone: +45 6315 7134, Fax: +45 6593 2999, Email: storm@ifad.dk
WWW: http://www.ifad.dk
---------------------------------------------------------------