Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Threading in C++

2 views
Skip to first unread message

Ambreen Ashfaq Afridi

unread,
Jan 29, 2009, 3:16:19 AM1/29/09
to
hi all
im new to threading in C++. Can any of you plz post a very simple and
well explained example of threading in c++, and also which files and
namespaces to include.
thanks a lot

Fred Zwarts

unread,
Jan 29, 2009, 3:27:01 AM1/29/09
to
"Ambreen Ashfaq Afridi" <amboa...@gmail.com> wrote in message news:7db61330-8bf7-4a04...@p36g2000prp.googlegroups.com...

Threading is not defined in C++.
The threading models of e.g. Linux and Windows are a bit different,
so you need a platform specific solution or use a library has a
uniform interface for different platforms. Such a solution may
not be portable to all platforms with a standard C++ compiler.

peter koch

unread,
Jan 29, 2009, 6:05:03 AM1/29/09
to

Take a look at boost. As Fred Zwarts told you, threading is not part
of the current C++ standard. But the next standard will include
threading, and boost should be a close approximation to what is going
to be in the next standard.

/Peter

abhiji...@gmail.com

unread,
Jan 29, 2009, 8:34:03 AM1/29/09
to
On Jan 29, 1:27 pm, "Fred Zwarts" <F.Zwa...@KVI.nl> wrote:
> "Ambreen Ashfaq Afridi" <amboafr...@gmail.com> wrote in messagenews:7db61330-8bf7-4a04...@p36g2000prp.googlegroups.com...

>
> > hi all
> > im new to threading in C++. Can any of you plz post a very simple and
> > well explained example of threading in c++, and also which files and
> > namespaces to include.
> > thanks a lot
>
> Threading is not defined in C++.
> The threading models of e.g. Linux and Windows are a bit different,
> so you need a platform specific solution or use a library has a
> uniform interface for different platforms. Such a solution may
> not be portable to all platforms with a standard C++ compiler.
In addition to above, Thereadign is gettign standardized, so will be
there soon in C++
http://www.youtube.com/watch?v=JffvCivHEHU&feature=channel
http://www.youtube.com/watch?v=mrvAqvtWYb4
0 new messages