Threads in C++

good help/tutorials?

Page 1 of 1

3 Replies - 3383 Views - Last Post: 08 May 2008 - 10:35 AM Rate Topic: -----

#1 foohoo  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 41
  • Joined: 10-August 07

Threads in C++

Post icon  Posted 08 May 2008 - 07:43 AM

Hi Guys,

Just a quick question, I want to get into creating multiple threads in C++. I have done it in JAVA but I can't find any good resources for C++. After searching all I seem to find are short paragraphs or very complicated programs.

Would you know any good resources for simple examples or tutorials for using threads in C++?

Thanks in advance!
Is This A Good Question/Topic? 0
  • +

Replies To: Threads in C++

#2 skyHigh  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 116
  • Joined: 01-October 07

Re: Threads in C++

Posted 08 May 2008 - 09:57 AM

hello foohoo and everyone,

I would like to see that too since I haven't done any multithreading program before, but I would like to learn it. I searched it too, but it's just like foohoo said, only description and complicate sour code which is so hard to follow.

any tutorial would be greatful, thanks.
Was This Post Helpful? 0
  • +
  • -

#3 skaoth  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 91
  • View blog
  • Posts: 601
  • Joined: 07-November 07

Re: Threads in C++

Posted 08 May 2008 - 10:27 AM

It would be helpful to know what platform you are using.
My experience is that threading in Java is much easier than c++, the api is just very simple in Java.

Anyways here is an example of threads in windows
http://www.codersour...ithreading.html

Here is one using pthreads. You can use this in windows and linux
http://www.cs.nmsu.e...ds/library.html
http://books.google.......CL4ZRRo#PPR7,M1

The last one I know about is boost
http://www.boost.org...tml/thread.html
http://www.ddj.com/cpp/184401518
Was This Post Helpful? 0
  • +
  • -

#4 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4333
  • View blog
  • Posts: 12,128
  • Joined: 18-April 07

Re: Threads in C++

Posted 08 May 2008 - 10:35 AM

There is a sticky thread at the top of the C/C++ forum for requesting a tutorial. You might also want to drop your request there (with some content you might want to see covered) and DIC authors can write up a tutorial about it. You can reach this thread at...

Request a C++ Tutorial

In the meantime there are multiple tutorials on the web about this subject... here are a few to get you started.

1) C++ Multithreading Tutorial - paulbridger.net
2) Advanced Topics in Programming Language [VIDEO THROUGH GOOGLE] :^:
3) C++ Programming HOW-TO (small example for review)

Enjoy! I like the video, it is a bit complex but it does talk about threads in detail. :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1