Just Software Solutions

ACCU 2013 and the C++ Standards Meeting

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.

ACCU 2013

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 e.g. 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 std::future (N3630) 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 std::future 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: waiting_future and shared_waiting_future. std::async would then be changed to return a 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 std::thread, so that the destructor of a joinable thread would call join() rather than std::terminate(). This was put up for vote as N3636, but again was voted down in full committee.

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 upgrade_mutex 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 shared_mutex and shared_lock, not upgrade_mutex, which is good. N3659 was also approved by the vote in full committee, so will be part of C++14.

Wrap up

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.

Posted by Anthony Williams
[/ news /] permanent link
Tags: , , ,

| Stumble It! stumbleupon logo | Submit to Reddit reddit logo | Submit to DZone dzone logo

Comment on this post

If you liked this post, why not subscribe to the RSS feed RSS feed or Follow me on Twitter? You can also subscribe to this blog by email using the form on the left.


Nice trip report! I like how you, very shortly and to the point, walk through the papers one by one. When the committee votes down a proposal like N3535, is their motivation for that available for read somewhere?

by TommyS at 04:45:23 on Tuesday, 07 May 2013


Could you explain why you think upgradable mutex is not a good idea in the end? I'm using two instances of boost ones in my current (game) application which uses TBB and boost for multithreading. I have no idea what might be the problem with upgradable mutex, so could you clarify so that I can decide if I should keep the related code?

by Joel Lamotte at 16:06:05 on Tuesday, 07 May 2013

@Tommy: The rationale is not currently publicly available. It might be in the minutes when they are published, but I can't remember how detailed the public ones get. I know there was concern about complexity and implementation overhead, but I was not present for the full discussion.

@Joel: I think that most of the time a need for an upgradeable mutex is a sign that the design could be improved. The implementation overhead of an upgradeable mutex is quite large, more so even than a simple shared mutex, so you may well be better off performance-wise with just a plain mutex. Certainly, it is worth profiling.

The other issue is that the design Howard posted (and the design of the boost equivalent) is fragile --- it is easy to write incorrect code, and especially easy to write code which is only incorrect on infrequently-used paths, such as error cases and when an exception is thrown.

by Anthony Williams at 16:55:19 on Tuesday, 07 May 2013

Thanks for this report Anthony. Could you share any additional details on the motivation for voting down N3636? I've recently been thinking about this very issue and haven't been able to come up with a use case for a (non-detached) std::thread object which is *not* wrapped in an RAII class designed to call join. Calling std::terminate is rarely the desired behaviour for any code so why is it preferred over join in this case? Thanks.

by Andrew Durward at 17:47:27 on Friday, 10 May 2013

This is nice information because i was also searching this type of help and techniques in my work. thanks again.

by Dipti Kapoor at 10:13:12 on Wednesday, 05 February 2014

nice post

by Sarah Nelson at 09:21:23 on Monday, 10 March 2014
by Olivia Jennifer at 09:21:50 on Monday, 10 March 2014

:- yeah its a intersting article about the improvement of project. For a better result of your project you may apply scrum in your project. I recently got my <a href="www.scrumstudy.com/">agile scrum certification</a> ; <a href="http://www.scrumstudy.com/scrum-master-certification.asp">Scrum Master Certification</a> offered by ScrumStudy to be precise.

by Alexia Marthoon at 09:22:11 on Monday, 10 March 2014
by Keukenblad at 10:20:12 on Thursday, 17 July 2014

<a href="http://www.companyspot.co.uk/">Company Spot</a> search in UK companies and organisations

by Company Spot at 10:25:36 on Tuesday, 19 August 2014
Hi, I think now I have a strong hold over the topic after going through the post. The subject that you have discussed in the post is really amazing; I will surely come back for more information. <a href="www.composietwerkblad.be">Werkblad</a>
by werkblad at 16:05:02 on Thursday, 04 September 2014
Thank you for this informative post that you have in here. Actually, it is very helpful information to those investors.
by werkblad graniet at 12:45:46 on Wednesday, 12 November 2014
by website laten maken at 06:06:28 on Saturday, 14 February 2015
Useful information shared..Iam very happy to read this article..thanks for giving us nice info.Fantastic walk-through. I appreciate this post.
by tafelblad at 07:55:30 on Saturday, 14 February 2015
This blog entry was written in a way that wasn't the best for it but the information that was given made up for that.
by keukenwerkblad at 10:16:07 on Monday, 30 March 2015
by a10 games at 07:34:14 on Wednesday, 03 August 2016

I really like the dear information you offer in your articles.

by color switch at 07:34:38 on Wednesday, 03 August 2016
by roblox at 07:34:56 on Wednesday, 03 August 2016

Im fairly positive theyre likely to be informed a great deal of new stuff here than anyone

by mortal kombat x at 07:35:11 on Wednesday, 03 August 2016

play the best free games slither io

by slither io at 22:07:12 on Monday, 12 September 2016

if you like click to play wingsio

by wingsio at 22:07:42 on Monday, 12 September 2016

click to play abc

by abc at 22:08:07 on Monday, 12 September 2016
I'm getting excited about this kind of beneficial information of your stuff in the future
by ColdFusion Project Help at 07:10:03 on Wednesday, 21 September 2016
Thank you very much! Your blog is always full of great idea. They are really helpful
by list of emoticons at 02:59:11 on Wednesday, 05 October 2016

Awesome work you have done here, I am very happy to read this nice post. You are a great writer and give us much information.Thanks for sharing with us.I wanna visited again.

by Justhost Coupon at 05:54:29 on Saturday, 10 December 2016
This is one of the cult game now, a lot of people enjoy playing them . Also you can refer to the game : <a href="http://goldminestrike.com/">gold mine strike</a> | <a href="http://pokemongo2.com/">pokemon go 2</a> The game controls are shown just under . Movement mechanisms primarily include acceleration and tilting controls. <a href="http://stickmangamesz.com/">stickman games</a> | <a href="http://stick-war-2.com/">stick war 2</a> | <a href="http://animaljam-2.com/">animal jam 2</a>
by animal jam at 02:43:12 on Thursday, 29 December 2016
by super smash flash 2 at 02:11:32 on Friday, 13 January 2017

This is such a great resource that you are providing and you give it away for free. I love seeing that understand the value of providing a quality resource for free

by bloons tower defense 5 at 02:11:57 on Friday, 13 January 2017

do you know play this games wings.io

by wings.io at 18:17:53 on Friday, 20 January 2017

let's play this gmaes slither.io in here .it is very hot in the world

by slither.io at 18:19:08 on Friday, 20 January 2017

if you like click to play this games for kids

by games for kids at 18:19:54 on Friday, 20 January 2017

if you want you can win play this games happy wheels in here

by happy wheels the game at 18:20:57 on Friday, 20 January 2017

Add your comment

Your name:

Your URL:

Email address:

Person or spambot?

Your comment:

Design and Content Copyright © 2005-2017 Just Software Solutions Ltd. All rights reserved.