What are the threading options in C++

  • Thread starter Lionel van den Berg
  • Start date
L

Lionel van den Berg

Hi all,

I'm just wondering what's the best option for threading in C++? I've
used pthreads and forking in C (the latter is not appropriate for my
situation now). All I want to do is run a function in a new thread, it's
a simple task, no interaction with other threads etc. so I don't have to
worry about deadlock, starvation and so on.

Thanks,

Lionel.
 
A

Andre Kostur

Hi all,

I'm just wondering what's the best option for threading in C++? I've
used pthreads and forking in C (the latter is not appropriate for my
situation now). All I want to do is run a function in a new thread, it's
a simple task, no interaction with other threads etc. so I don't have to
worry about deadlock, starvation and so on.

Threading is off-topic in comp.lang.c++. The Standard makes no mention of
threading. You're in OS-specific land and should ask in an OS-specific
newsgroup. Having said that, you may wish to go look in Boost. As I
recall, they have a threading class... (http://www.boost.org)
 
L

Lionel van den Berg

Andre said:
@bunyip2.cc.uq.edu.au:




Threading is off-topic in comp.lang.c++. The Standard makes no mention of
threading.

My apologies.
You're in OS-specific land and should ask in an OS-specific
newsgroup. Having said that, you may wish to go look in Boost. As I
recall, they have a threading class... (http://www.boost.org)

Thanks.

Lionel.
 
M

Matthias Kaeppler

Andre said:
@bunyip2.cc.uq.edu.au:




Threading is off-topic in comp.lang.c++. The Standard makes no mention of
threading. You're in OS-specific land and should ask in an OS-specific
newsgroup. Having said that, you may wish to go look in Boost. As I
recall, they have a threading class... (http://www.boost.org)

Actually it's not /that/ off-topic, since IIRC threading and concurrency
is planned to be supported by C++0x.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,201
Messages
2,571,052
Members
47,656
Latest member
rickwatson

Latest Threads

Top