Click here to Skip to main content
Rate this: bad
good
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
good
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.
http://www.boost.org/doc/libs/1_51_0/doc/html/thread.html[^]
  Permalink  
v2
Comments
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 http://en.wikipedia.org/wiki/C%2B%2B11 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 OriginalGriff 195
1 Afzaal Ahmad Zeeshan 132
2 ProgramFOX 130
3 Maciej Los 105
4 Sergey Alexandrovich Kryukov 75
0 OriginalGriff 6,564
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,228
3 Manas Bhardwaj 4,657
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 22 Oct 2012
Copyright © CodeProject, 1999-2014
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