Blog Archive for / 2012 /
just::thread C++11 Thread Library V1.8.2 released
Tuesday, 06 November 2012
I am pleased to announce that version 1.8.2
of just::thread
,
our C++11 Thread Library
has just been released.
This release adds support for gcc 4.7.2, and consequently official support for Ubuntu Quantal and Fedora 17.
just::thread
is now available for the following compilers:
- Microsoft Visual Studio 2005, 2008, 2010 and 2012 for both 32-bit and 64-bit Windows,
- TDM gcc 4.5.2 and 4.6.1 for both 32-bit and 64-bit Windows,
- g++ 4.3, 4.4, 4.5, 4.6 and 4.7 (4.7.2 or later) for both 32-bit and 64-bit Linux (x86/x86_64), and
- MacPorts g++ 4.3, 4.4, 4.5, 4.6 and 4.7 (4.7.2 or later) for 32-bit and 64-bit MacOSX.
Get your copy of Just::Thread
Purchase your copy and get started with the C++11 thread library now.
As usual, existing customers are entitled to a free upgrade to V1.8.2 from all earlier versions.
Posted by Anthony Williams
[/ news /] permanent link
Tags: multithreading, concurrency, C++0x, C++11
Stumble It! | Submit to Reddit | Submit to DZone
If you liked this post, why not subscribe to the RSS feed or Follow me on Twitter? You can also subscribe to this blog by email using the form on the left.
just::thread C++11 Thread Library V1.8.0 vs Microsoft Visual Studio 2012
Thursday, 06 September 2012
I am pleased to announce that version 1.8.0
of just::thread
,
our C++11 Thread Library
has just been released.
This release adds official support for Microsoft Visual Studio 2012, as well as providing some minor bug fixes and improvements across the board.
Some people have asked how Just::Thread compares to the thread-library support in Microsoft Visual Studio 2012, given that VS2012 now provides the new C++11 concurrency headers, so I ran some of the Just::Thread tests against the VS2012 library. It turns out that there are quite a few places where Just::Thread has better conformance than VS2012, so if you're making heavy use of the C++11 thread library then upgrading to Just::Thread is an essential investment.
VS2012 thread library conformance issues
Here is a list of some of the areas where Just::Thread provides better conformance than VS2012. Some of these can be worked around; others are important for correctly-functioning code. This is just a sample, not a comprehensive list.
- With the VS2012 library, you cannot use move-only types with
std::promise
, andstd::async
doesn't work with functions that return move-only types. - With the VS2012 library,
std::thread
doesn't work with move-only argument types. - With the VS2012 library, the
wait_for
andwait_until
functions return incorrect values when used with astd::future
that comes from astd::promise
. - With the VS2012 library, when
std::async
is used with a launch policy ofstd::launch::async
, the destructor of the returnedstd::future
instance does not wait for the thread to complete. - With the VS2012 library,
std::unique_lock
does not check whether or not it owns the lock before calling operations on the underlying mutex, triggering undefined behaviour rather than throwing an exception in many cases. - With the VS2012 library, the
std::atomic<>
class template cannot be used on types without a default constructor. - With the VS2012 library,
std::launch
and other strongly-typed enums such asstd::future_status
are emulated with a namespace-scoped enum rather than a strongly-typed enum.
In all these cases (and more), Just::Thread conforms with the standard.
Just::Thread optimizations
Just::Thread also offers various optimizations over the VS2012 thread library such as the following.
- The return value from a task run with
std::async
is copied/moved fewer times, and moved where possible. - A function object passed to
std::thread
is copied or moved fewer times. - The task passed to
std::async
is destroyed as soon as the task is completed, even if there are outstanding futures that reference the result.
Again, this is not a comprehensive list. Just::Thread has been carefully optimized to ensure common use cases have the best performance possible whilst remaining conformant to the C++11 standard.
Get your copy of Just::Thread
Purchase your copy and get started with the C++11 thread library now.
As usual, existing customers are entitled to a free upgrade to V1.8.0 from all earlier versions.
Posted by Anthony Williams
[/ news /] permanent link
Tags: multithreading, concurrency, C++0x, C++11
Stumble It! | Submit to Reddit | Submit to DZone
If you liked this post, why not subscribe to the RSS feed or Follow me on Twitter? You can also subscribe to this blog by email using the form on the left.
ACCU 2012 Report
Thursday, 03 May 2012
I'm now back home again from ACCU 2012. As ever, it was an exhausting, but thoroughly enjoyable conference. With 5 tracks it was sometimes very hard to choose which session to attend.
There were a surprising number of talks on C, though mostly just to confirm that C is a dying language, a "zombie language" as Uncle Bob put it, even if there is still a niche or two where it is the best fit.
There was also a fair number of sessions on testing, especially TDD (even TDD in C), and a few sessions on other agile practices.
However, the big topic of the conference was C++11. Nicolai Josuttis ran a full day pre-conference tutorial on the C++11 library, and then there were sessions on the best and worst features of the C++11 library, C++11 for everybody, C++11 for the rest of us, C++11 allocators, writing generic code with C++11, the C++11 concurrency facilities, an interactive C++11 programming session, and even a C++11 pub quiz (with free beer!)
The other big topic was concurrency and parallelism, with 6 presentations, including two by me. Actors and Dataflow seemed to be a common theme — it looks like these ideas are finally filtering into the mainstream now that everyone and his dog has a multicore computer in their pocket. Not only did Russel, Jason and I reference them in our presentations, but several of the developers I spoke to had implemented their own actor or dataflow libraries, or were interested in using one.
My presentations
My own presentations went well. My first one (on Dataflow, Actors and High Level Structures in Concurrent Applications, on Thursday afternoon) was packed out. There were quite a few interesting questions from the audience, and someone told me it was the best presentation at the conference, which was really nice to hear. Several people asked about slides and the code samples, and I promised to make them available. The slides are here and the code samples here
My second presentation was the C++11 concurrency tutorial on Saturday morning. I was presenting in the first slot after the keynotes, and the speakers dinner was the night before, so a lot of people had been looking rather the worse for wear in the beginning. However, the room was almost full again, and the audience seemed to be awake — yet again there were many interesting questions that showed people were paying attention. The slides for are here and the code samples here
My book
My book was only published a couple of months before the conference, so it was exciting to see so many people clutching copies. Apparently the Blackwell's stall sold out, which was nice for me, but unfortunate for those that didn't manage to get a copy. If you wanted a copy then you can buy it direct from Manning, or from amazon.com, or amazon.co.uk.
Posted by Anthony Williams
[/ news /] permanent link
Tags: accu, conference, concurrency, c++
Stumble It! | Submit to Reddit | Submit to DZone
If you liked this post, why not subscribe to the RSS feed or Follow me on Twitter? You can also subscribe to this blog by email using the form on the left.
ACCU 2012
Wednesday, 25 April 2012
The main sessions of the ACCU 2012 conference start today.
This year I'm presenting two sessions. The first is tomorrow, at 4pm: Dataflow, actors, and high level structures in concurrent applications. In this session, I'll be talking about high level approaches for writing concurrent architectures including actors and dataflow architectures, and giving example code in multiple languages, including C++ and Groovy.
My second session is on Saturday at 11am, C++11 concurrency tutorial. This session will cover how to use the new C++11 thread library, as well as various guidelines for avoiding race conditions and deadlocks.
Hope to see you there!
Posted by Anthony Williams
[/ news /] permanent link
Tags: conferences
Stumble It! | Submit to Reddit | Submit to DZone
If you liked this post, why not subscribe to the RSS feed or Follow me on Twitter? You can also subscribe to this blog by email using the form on the left.
C++ Concurrency in Action and Just::Thread Discounts
Wednesday, 25 April 2012
My book C++ Concurrency in Action was finally published on 29th February 2012, after 4 years of work. It's hard to believe that I can actually hold a copy in my hand; it's just been files on my computer for so long.
My book is a tutorial and reference to the thread library from the new C++11 standard. It also provides various guidelines for writing and testing multithreaded code, as well as sample implementations of thread-safe data structures and parallel algorithms
If you haven't already got a copy, you can order one direct from Manning, or from amazon.com, or amazon.co.uk. Alternatively, copies should be available at the ACCU 2012 conference in Oxford this week.
Discount on Just::Thread
If you have purchased the book then send a copy of your receipt or other proof of purchase to info@justsoftwaresolutions.co.uk for a 50% discount on a single user license of Just::Thread, our implementation of the C++11 thread library described in the book for Microsoft Visual Studio on Windows, and g++ on Windows, Linux and MacOSX.
Posted by Anthony Williams
[/ threading /] permanent link
Tags: c++, concurrency, book, multithreading
Stumble It! | Submit to Reddit | Submit to DZone
If you liked this post, why not subscribe to the RSS feed or Follow me on Twitter? You can also subscribe to this blog by email using the form on the left.
Happy New Year 2012
Tuesday, 10 January 2012
Now the post-holidays rush is over, I'd like to wish you all a Happy New Year!
2011 was another good year for me. Sales of
Just::Thread
,
my implementation of the C++11
thread library continue to grow,
and my book is finally
in typesetting, and nearly ready for printing. We had hoped to get
it done by the end of 2011, but last-minute corrections scuppered
that. It should now be done relatively quickly.
It's also been a big year for the C++ community: C++11 is now an official ISO standard. This is the culmination of many years of hard work from a huge number of people, so it's good to see it finally done.
Popular articles
As is my custom, here's a list of the 10 most popular articles and blog entries from the Just Software Solutions website in 2011.
- Implementing
a Thread-Safe Queue using Condition Variables
A description of the issues around writing a thread-safe queue, with code. - Implementing
drop-down menus in pure CSS (no JavaScript)
How to implement drop-down menus in CSS in a cross-browser fashion (with a teensy bit of JavaScript for IE). - Importing
an Existing Windows XP Installation into VirtualBox
This article describes how I recovered the hard disk of a dead laptop to run as a VM under VirtualBox. - Multithreading
in C++0x part 1: Starting Threads
This is the first part of my series on the new C++11 thread library. Links to the remaining parts are at the end of the article. - Thread-Safe
Copy and Move Constructors
This is a guest post by Michael Spertus on writing copy and move constructors for objects with internal locks. - Multithreading
in C++0x part 2: Starting Threads with Function Objects and
Arguments
This is the second part of my series on the new C++11 thread library, which covers using callable objects when starting threads, and passing arguments to the thread function. - Introduction
to C++ Templates
My basic introduction to C++ templates. - Multithreading
in C++0x part 8: Futures, Promises and Asynchronous Function
Calls
This is the eighth part of my series on the new C++11 thread library, which covers the "futures" mechanism for passing data between threads. - Thread
Interruption in the Boost Thread Library
A description of the thread interruption feature of the Boost Thread library. - Deadlock
Detection with just::thread
This article describes how to use the special deadlock-detection mode of ourjust::thread
C++11 thread library to locate the cause of deadlocks.
What's coming in 2012?
Will 2012 be even better than 2011? I hope so. As I already mentioned, my book will finally be printed, which will be a big relief for me.
What are you looking forward to in 2011?
Posted by Anthony Williams
[/ news /] permanent link
Tags: popular, articles
Stumble It! | Submit to Reddit | Submit to DZone
If you liked this post, why not subscribe to the RSS feed or Follow me on Twitter? You can also subscribe to this blog by email using the form on the left.
Design and Content Copyright © 2005-2024 Just Software Solutions Ltd. All rights reserved. | Privacy Policy