Topic: Comment on N4204 and friends: Latches and Barriers
Author: Ed <morwenn29@gmail.com>
Date: Thu, 16 Oct 2014 01:37:20 -0700 (PDT)
Raw View
------=_Part_4745_591070762.1413448640816
Content-Type: text/plain; charset=UTF-8
The proposal for latches and barriers in C++ is already at its sixth
revision + an additional paper to propose std::flex_latch.
While I globally like the proposed interface, I wonder whether operator--
and operator-= could be overloaded to complement
or replace count_down in the proposed std::latch and std::flex_latch. I
feel that for this particular purpose, these operators
are meaningful and may even be more expressive than count_down.
As a note, I suppose that the name count_down may come from Java's
CountDownLatch.countDown, and Java is known not
to offer operator overloading.
N4204, Latches and Barriers:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4204.html
N4224, Supplements to Latches:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4224.html
Java's CountDownLatch:
http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/CountDownLatch.html
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_4745_591070762.1413448640816
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">The proposal for latches and barriers in C++ is already at=
its sixth revision + an additional paper to propose std::flex_latch.<br>Wh=
ile I globally like the proposed interface, I wonder whether operator-- and=
operator-=3D could be overloaded to complement<br>or replace count_down in=
the proposed std::latch and std::flex_latch. I feel that for this particul=
ar purpose, these operators<br>are meaningful and may even be more expressi=
ve than count_down.<br><br>As a note, I suppose that the name count_down ma=
y come from Java's CountDownLatch.countDown, and Java is known not<br>to of=
fer operator overloading.<br><br><br>N4204, Latches and Barriers: <a href=
=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4204.html">htt=
p://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4204.html</a><br>N422=
4, Supplements to Latches: <a href=3D"http://www.open-std.org/jtc1/sc22/wg2=
1/docs/papers/2014/n4224.html">http://www.open-std.org/jtc1/sc22/wg21/docs/=
papers/2014/n4224.html</a><br>Java's CountDownLatch: <a href=3D"http://docs=
..oracle.com/javase/7/docs/api/java/util/concurrent/CountDownLatch.html">htt=
p://docs.oracle.com/javase/7/docs/api/java/util/concurrent/CountDownLatch.h=
tml</a><br></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_4745_591070762.1413448640816--
.