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] Wed Mar  9 11:28:00 -0800 
2005 -------
Hi Michael, all,

Well, the osl_waitCondition() code actually is correct, and must not be changed.

[My "Pthreads Programming; Bradford Nichols ...; O'Reilly 1996" has this kind of
while-loop under the topic "checking the condition on wake up: spurious wake
ups"; this is a standard condition programming pattern.]

What happens here is clearly an application logic error; code that sets and
immediately resets a condition in the same thread is insane (IMHO).

A condition is designed to be communication tool between threads. Thus, one (or
multiple) thread(s) do set a condition to indicate that some state has been
reached, so that other (multiple) thread(s) can wakeup and act according to that
state, and then reset the condition. Classical example is a "queue not empty"
state / condition (producer / consumer scenario).

This race condition needs to be fixed in vcl (maybe an appropriate inter-thread
communication protocol needs to be designed first).

Hope that helps,
Matthias

---------------------------------------------------------------------
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