Here is the list of Threading libraries in C++
Pthread (POSIX threads)
http://en.wikipedia.org/wiki/POSIX_Threads
pthread won't work fine on windows, because windows won't support POSIX standards - but there are some implementations of pthreads api on windows also!
Note: pthread is a c library not a c++ library, hence you can use it in c applications also.
Boost::thread - supports many compilers and architectures include Linux
and Windows.
Check these links: http://www.ddj.com/cpp/184401518,
http://www.boost.org/doc/html/thread.html
The problem with Boost libraries is that it requires good knowledge on STL, and learning is not very easy.
Glib::thread - Glib supports multi-threading, it can run on Windows and Linux but I don't think it supports VC++ compiler.
Check these:
http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1Th
read.html, http://inti.sourceforge.net/tutorial/libinti/threads.html
Qt: Qt library (not the Quick Time player from Apple) also have threading support (both 3.x and 4.x versions). Qt 4.x is released under GPL for Windows also.
http://doc.trolltech.com/3.3/threads.html
Note: Nokia recently acquired TrollTech (the company behind Qt)
Intel threading library:
One more library from Intel (open source library, GPL2 with the runtime
exception). But only works on x86 or x86_64 (Intel or AMD; 32 or 64 bit)
architectures.
http://www.intel.com/software/products/tbb/
http://threadingbuildingblocks.org
And it is easy to write own threading library too!
Win32 is also having a thread api - but who is using win32 or MFC these days?
Anyhow in next version <http://en.wikipedia.org/wiki/C%2B%2B0x> of C++, standard library will support threading - API very similar to boost::thread library!
No comments:
Post a Comment