To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=44627





------- Additional comments from [EMAIL PROTECTED] Thu Mar 10 07:28:02 -0800 
2005 -------
hro - I couldn't agree more - or at least, IMHO the pthread approach is
demonstrably more beautiful & efficient - but - either way, we have to be
consistent.

Unfortunately the existing pthreads based implementation is neither beautiful
nor consistent, otherwise Philip's original code (odd as it looks) would have
worked fine. ie.: "NOTE: ALL threads waiting on this condition are unblocked!"
is clearly not the case for Unix - where it is easy in the case of a long
timeout vs. an active set/resetter to never become unblocked;

Thus my question is: What are you going to do about it ? :-)

eg. committing my trivial patch:

--- sal/osl/unx/conditn.c       16 Mar 2001 13:14:43 -0000      1.4
+++ sal/osl/unx/conditn.c       10 Mar 2005 10:11:43 -0000
@@ -278,7 +278,7 @@ oslConditionResult SAL_CALL osl_waitCond
                return osl_cond_result_error;
        }
 
-       while ( ! pCond->m_State )
+       if ( ! pCond->m_State )
        {
                if ( pTimeout )
                {

would fix the problem & at least makes the osl_waitCondition method work as
advertised ;-)

I wonder how many other pieces of code actually use this timeout & whether
there'll be a nice performance win there too.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to