Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

C++ Questions

 
Chun Chu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch , Anthony AJ Williams.
 
Chun Chu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic