File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes C / C++ and the fly likes C++ Questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » C / C++
Bookmark "C++ Questions" Watch "C++ Questions" New topic
Author

C++ Questions

Chun Chu
Greenhorn

Joined: Jan 11, 2011
Posts: 15
Hi Mr. Williams,

The title of the book sounds very exciting. Multithreading is always an interesting topic in C++.

I have only glanced a little on the new C++0x but from a high level view, it looks like it is a new beast that might requires some new learning curve.

Question 1: Do you need to know the basics of C++0x in order to understand and learn from the material written in the book?

Looking at some C++0x features, it said that a new std::thread is introduced. I am assuming that this book will cover std::thread in depth.

Question 2: Is there any comparison discussed in the book regarding with the pros and cons between the new std::thread and existing threading framework such as pthread, ACE thread and boost thread?

Question 3: Is the new std::thread platform-independent?

Thanks!!

- Chun
Anthony Aj Williams
author
Ranch Hand

Joined: Jun 10, 2011
Posts: 56
Chun Chu wrote:
Question 1: Do you need to know the basics of C++0x in order to understand and learn from the material written in the book?


No. Though some of the new C++0x features are used in the book, they are explained when used, and there is an appendix covering them in more depth.

Chun Chu wrote:
Looking at some C++0x features, it said that a new std::thread is introduced. I am assuming that this book will cover std::thread in depth.


Yes, it will.

Chun Chu wrote:
Question 2: Is there any comparison discussed in the book regarding with the pros and cons between the new std::thread and existing threading framework such as pthread, ACE thread and boost thread?


There is a comparison chart between C++0x concurrency facilities and other threading frameworks in the appendix. I think all new C++ code should use the C++0x concurrency facilities unless there is a strong reason not to (such as lack of availability on one of your target platforms).

Chun Chu wrote:
Question 3: Is the new std::thread platform-independent?


Yes, that is the point of it being standard --- it will work on any standard-conforming compiler and library. GCC is currently the only compiler I am aware of that ships with std::thread support out of the box (though that support is currently incomplete), but my just::thread library provides the full facilities for GCC (on Linux, MacOSX and Windows) and MSVC.


Author of C++ Concurrency in Action http://www.stdthread.co.uk/book/
just::thread C++11 thread library http://www.stdthread.co.uk
Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk
15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39386
    
  28
Welcome to the Ranch , Anthony AJ Williams.
Chun Chu
Greenhorn

Joined: Jan 11, 2011
Posts: 15
Thanks for your respond.

I am looking forward to take advantage of the new std::thread.

Multi-threading is always an interesting topic in C++ because C++ never bundle with any standardize multi-threading facilities till now.

I have always been using cross-platforms threading facilities to overcome this issue but now it looks like the std::thread would finally solve the cross platforms issue for us.

That's a good news!

Marco Fernandez Galvan
Greenhorn

Joined: Jun 24, 2011
Posts: 3
I have read about you and your book, and I like to be selected by chance I have to do a project for a company, and your book would serve me much help, save me time looking for solutions in the network.

A question I ask you, if you have taken a long time and headaches, writing this book?

A greeting and good luck with the book, and all followers of this forum just to say that cane to keep giving these keyboards.
Anthony Aj Williams
author
Ranch Hand

Joined: Jun 10, 2011
Posts: 56
Marco Fernandez Galvan wrote:A question I ask you, if you have taken a long time and headaches, writing this book?


Yes. Trying to explain a technical topic is not easy, and I wanted to get it right. Also, as I noted in my reply to another question, the C++0x standard was originally intended to be published before 2009, but it has been delayed until this year. The standard draft has changed in that time, so some of what I wrote 2 or 3 years ago would now be out of date if I hadn't updated it.
Brian Overland
author
Ranch Hand

Joined: Sep 09, 2011
Posts: 36
Brian Overland here. A brief comment this time. I haven't had the pleasure of receiving a copy of Anthony AJ Williams book yet, but I would have to say: if you are interested in the topic of multi-threading, I would heartily recommend his book, as he clearly seems to know what he's talking about. It is not an easy subject and requires specialized expertise.

AJ, I will look for your book and try to get it myself! Best wishes,

Brian Overland
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: C++ Questions