<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<title></title>
<style type="text/css">code{white-space: pre;}</style>
</head>
<body>
<p>Hi Rémi,</p>
<p>On 2017-03-29 22:26, Rémi Denis-Courmont wrote:</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> Le keskiviikkona 29. maaliskuuta 2017, 21.20.02 EEST Filip Roséen a écrit :</code></pre>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> On 2017-03-29 22:03, Rémi Denis-Courmont wrote:</code></pre>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> Le keskiviikkona 29. maaliskuuta 2017, 20.50.50 EEST Filip Roséen a écrit </code></pre>
<p>:</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> The thread is per definition not waiting for the conditiona variable
at that time, so I cannot see how it would wake itself up.</code></pre>
</blockquote>
<pre><code> You are making unwarranted assumptions about condition variables here.</code></pre>
</blockquote>
<pre><code> Assumptions based on specifications, I would however be extremely
interested on implimentations where this "assumption" does not hold
(mostly because a issue should definitely be filed based on such
finding).</code></pre>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> Been there done that.</code></pre>
</blockquote>
<pre><code> Previous paragraph.</code></pre>
</blockquote>
<pre><code> There is not much point in discussing if we cannot agree on facts such as
the meaning of the specification.</code></pre>
</blockquote>
<pre><code> Opinion acknowledged.</code></pre>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> Both my experience and my understanding of CV tells me that this patch is
factually wrong.</code></pre>
</blockquote>
<pre><code> Given that you say that my assumptions are wrong, the code should be
easy to break, or there should be a very easy way to demonstrate that
my assumptions about *condition-variables* are wrong.
I am happy to take a conforming implementation of the specification as
an example, so if you could be kind to link me the source of such I
would happily read it.</code></pre>
</blockquote>
<pre><code> I already told you: the thread can end up waking itself up, instead of the
more intuitive behaviour that you expect.
In other words, it is perfectly possible for: lock; signal/broadcast; wait;
unlock; to steal the wake up, when you would expect that it wakes up another
thread (if any is sleeping).
You could argue that many a description of condition variable rules such
behaviour out, or at least seems to. But this happens in real life, and I
cannot say that it would contradict the "original" POSIX definition.</code></pre>
</blockquote>
<p>I have not seen a single implementation that would allow for such behavior, but I am interested in one that does. Also, since you are so keen on the waking up itself part, spurious wake-ups are allowed and expected, so how would this <strong>actually</strong> lead to any strange (besides potentially unwanted) behavior?</p>
</body>
</html>