<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
On 27/06/2011 11:58, Martin wrote:
<blockquote cite="mid:4E08624E.9090402@mfriebe.de" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
On 27/06/2011 11:19, Michael Schnell wrote:
<blockquote cite="mid:4E085940.50001@lumino.de" type="cite">On
06/27/2011 11:37 AM, Martin wrote: <br>
<blockquote type="cite"> <br>
If the function, for example stores some important data in a
thread local variable, but flags (thread global) the
availability of the data, then no Critical section will fix
it. <br>
<br>
</blockquote>
Yep ! <br>
<br>
As stated in my former messages in this thread, IMHO, the
"official" definition of thread-safe-ness does not make much
sense with objects, but a more complex definition covering
several cases of use is necessary. <br>
</blockquote>
<br>
Why? Where does the definition conflict with the above?<br>
"A piece of code is <b>thread-safe</b> if it can be safely
invoked by multiple threads at the same time"<br>
<br>
"Save invocation" includes that the function returns a "correct"
result(output) for any "input".<br>
</blockquote>
Make that "any defined/allowed" input<br>
<br>
Obviously if you pass in a pointer to random memory as object
instance no function will be ave to call.<br>
<br>
<br>
<blockquote cite="mid:4E08624E.9090402@mfriebe.de" type="cite"> <br>
Where "input":<br>
- is not limited to the parameters passed in the parameter list,
not even to limited to parameters passed implicitly (such as the
object instance)<br>
- input includes the entire state of the system (that can be
global vars, available and unavailable resources of any kind, and
much more)<br>
The same applies to "result", or "output".<br>
</blockquote>
<br>
</body>
</html>