Monday, 06 May 2013
This year's ACCU conference was at a new venue: the Marriott hotel in Bristol. This is a bit closer to home for me than the previous venue in Oxford, which made the trip there and back more comfortable. As ever, the conference itself was enjoyable, educational and exhausting in equal measure.
This year was also BSI's turn to host the Spring ISO C++ committee meeting, which was conveniently arranged to be the week following ACCU, in the same hotel. Having not attended a meeting since the last time the committee met in the UK, I was glad to be able to attend this too.
As usual, with 5 tracks running simultaneously, it was hard to choose which sessions to attend. I stuck mostly to C++-centric, or general software development sessions, but there were also sessions on a wide range of other topics, including Ruby, Java, Scala, Git, C#, testing, management and culture, amongst others.
I was invited to contribute to Pete Goodliffe's Becoming a Better Programmer panel session, which was well attended and entertaining, as usual for Pete's sessions. My contribution on "doing things mindfully" seemed well-received, but wasn't the most popular — that honour went to Seb Rose, though Brian Marick called out Anna-Jayne Metcalfe's contribution on "If it ain't broke, do fix it" in the keynote the next morning.
My presentation on "C++11 in the Real World" was also well attended, with some good questions from the audience. A couple of people have asked me for my slides: they are available from the ACCU website.
ISO C++ committee meeting
This was a landmark meeting, for several reasons. Firstly, there were over 100 attendees, making it one of the most well-attended ISO C++ meetings ever. Secondly, this bumper attendee count was complemented by a bumper batch of proposals and position papers to process, which meant that all the working groups were pressed for time, and people met for extra sessions in the evenings to try and get through them all. Finally, the committee voted to publish a new "CD", starting the formal process leading to a C++14 standard.
The meeting was 6 days long, but I was only able to attend for the first 2 days. Unsurprisingly, I spent my time in the Concurrency group (SG1). We had a lot of papers to discuss, and some of the discussions were quite involved. Ultimately, not many papers were forwarded to the full committee, and only one paper other than the basic defect-report fixes was approved.
Lawrence Crowl's paper on Stream Mutexes
(N3535) was first
up. The problem this paper is trying to address is ensuring that data written to a stream from
multiple threads appears in a coherent order — though concurrent writes to
std::cout are guaranteed not to yield undefined behaviour, the output may be
interleaved in an arbitrary fashion. This got quite a bit of discussion over the course of the
week, and was eventually submitted as a much-modified paper for writing chunks to a stream in an
atomic fashion, which was voted down in full committee.
Herb Sutter's late paper on the behaviour of the destructor of
was up next. This is a highly conterversial topic, and yielded much discussion. The crux of the
matter is that as currently specified the destructor of
std::future blocks if it came
from an invocation of
std::async, the asynchronous function was run on a separate
thread (with the
std::launch::async policy), and that thread has not yet
finished. This is highly desirable in many circumstances, but Herb argued that there are other
circumstances where it is less desirable, and this makes it hard to use
in some types of program.
Much of the discussion focused on the potential for breaking existing code, and ways of
preventing this. The proposal eventually morphed into a new paper (N3637) which created 2 new
types of future:
std::async would then be changed to return
waiting_future instead of a
future. Existing code that compiled
unchanged would then keep the existing behaviour; code that changed behaviour would fail to
compile. Though the change required to get the desired behaviour would not be extensive, the
feeling in the full committee was that this breakage would be too extensive, and the paper was
also voted down in full committee.
Herb's original paper also included a change to the destructor of
that the destructor of a joinable thread would call
std::terminate(). This was put up for vote as N3636, but again was voted down in
Like I said, there were lots of other papers up for discussion. Some were concrete proposals, whilst others were less complete, asking for feedback on the approach. Only one paper was approved for the C++14 time frame — whilst there was considerable interest in the idea behind some of the others, there was disagreement about the details, and nothing else was deemed ready. I look forward to seeing the revised versions of some of these proposals when they are ready, especially the executors, continuations and parallel algorithms papers.
The paper that did get approved was Howard Hinnant's paper on shared locking
(N3568), but even
that didn't go through unchanged. I have serious concerns about the
proposed in the original paper, and while I didn't manage to get my concerns across via email (this
was discussed after I left), there was not enough interest in including it in C++14. The approved
paper (N3659) therefore included only
upgrade_mutex, which is good. N3659 was also
approved by the vote in full committee, so will be part of C++14.
Having the conference and ISO meeting back-to-back was intense, but I thoroughly enjoyed attending both. C++14 looks set to be a significant improvement over C++11 — though the individual changes are minor, they offer quite a bit in terms of improved usability of the language and library. See the trip reports by Herb Sutter and Michael Wong (part 2, part 3) for more details on the accepted papers.
Design and Content Copyright © 2005-2017 Just Software Solutions Ltd. All rights reserved.