<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 1177</TITLE>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<STYLE TYPE="text/css">
  INS { text-decoration:none; font-weight:bold; background-color:#A0FFA0 }
  .INS { text-decoration:none; background-color:#D0FFD0 }
  DEL { text-decoration:line-through; background-color:#FFA0A0 }
  .DEL { text-decoration:line-through; background-color: #FFD0D0 }
  @media (prefers-color-scheme: dark) {
    HTML { background-color:#202020; color:#f0f0f0; }
    A { color:#5bc0ff; }
    A:visited { color:#c6a8ff; }
    A:hover, a:focus { color:#afd7ff; }
    INS { background-color:#033a16; color:#aff5b4; }
    .INS { background-color: #033a16; }
    DEL { background-color:#67060c; color:#ffdcd7; }
    .DEL { background-color:#67060c; }
  }
  SPAN.cmnt { font-family:Times; font-style:italic }
</STYLE>
</HEAD>
<BODY>
<P><EM>This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21
  Core Issues List revision 118b.
  See http://www.open-std.org/jtc1/sc22/wg21/ for the official
  list.</EM></P>
<P>2025-09-28</P>
<HR>
<A NAME="1177"></A><H4>1177.
  
Intra-thread dependency-ordered-before
</H4>
<B>Section: </B>6.10.2&#160; [<A href="https://wg21.link/intro.multithread">intro.multithread</A>]
 &#160;&#160;&#160;

 <B>Status: </B>C++11
 &#160;&#160;&#160;

 <B>Submitter: </B>CA
 &#160;&#160;&#160;

 <B>Date: </B>2010-08-10<BR><BR>


<P>[Voted into the WP at the November, 2010 meeting as part of paper
N3196.]</P>

<A href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3296.html#CA15">N3092 comment
  CA&#160;15<BR></A>

<P>The current draft has release/acquire synchronize-with
edges only between a release on one thread and an
acquire on a <I>different</I> thread, whereas the definition of
dependency-ordered-before permits the release and
consume to be on the same thread; it seems odd to permit
the latter. (At the moment function arguments can't race or
sync with each other, but they can be dependency
ordered before each other.)</P>

<P>We don't currently have an example in which this makes a real
difference, but for symmetry could suggest changing the definition of
dependency-ordered-before in 6.10.2 [<A href="https://wg21.link/intro.multithread">intro.multithread</A>].</P>

<P><B>Proposed resolution (August, 2010):</B></P>

<P>Change 6.10.2 [<A href="https://wg21.link/intro.multithread#9">intro.multithread</A>] paragraph 9 as follows:</P>

<BLOCKQUOTE>

<P>An evaluation <I>A</I> is <I>dependency-ordered before</I> an
evaluation <I>B</I> if</P>

<UL>
<LI><P>
<I>A</I> performs a release operation on an atomic object
<I>M</I>, and<INS>, on another thread,</INS> <I>B</I> performs a
consume operation on <I>M</I> and reads a value written by any side
effect in the release sequence headed by <I>A</I>, or</P></LI>

<LI><P>for some evaluation <I>X</I>, <I>A</I> is dependency-ordered
before <I>X</I> and <I>X</I> carries a dependency to
<I>B</I>.</P></LI>

</UL>

<P>[<I>Note:</I>...</P>

</BLOCKQUOTE>

<BR><BR>
</BODY>
</HTML>
