Click here to Skip to main content
11,410,129 members (61,620 online)
Rate this: bad
Please Sign up or sign in to vote.
I am porting my C++ application from windows to Linux.

While porting thread related stuff, what i observed is , we can use pthread. Is ther any other way out there in Linux for multithreading other than pthraed ?
Posted 21-Oct-12 22:14pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can use the Thread module from the open source C++ library Boost. If you dont know Boost yet it is something you should look into anyway.[^]
PrafullaVedante at 22-Oct-12 3:20am
is ther anything which is native ? and not third party ?
Legor at 22-Oct-12 3:51am
I'm not aware of anything else. But also Boost is a third party library which is very advisable. Many of the new features in C++0x for example were first provided in Boost (which isn't a suprise since Boost was founded by members of the C++ standardization commitee). In my opinion (and many others) every C++ developer should get known to Boost. It is especially for your case since Boost is designed to enable the development of portable code.
markkuk at 22-Oct-12 7:32am
Pthreads are the native way of multithreading on Linux and all other Unix/Posix -style operating systems. C++11 has threads in its standard library, so you don't need third-party classes when a C++11 compatible G++ becomes available.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 169
1 OriginalGriff 70
2 BillWoodruff 70
3 Maciej Los 68
4 Philippe Mori 60
0 Sergey Alexandrovich Kryukov 8,755
1 OriginalGriff 6,915
2 Maciej Los 3,390
3 Abhinav S 3,248
4 Peter Leow 3,059

Advertise | Privacy | Mobile
Web03 | 2.8.150414.5 | Last Updated 22 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100