Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: C++
Expertise: Beginner
Jun 15, 2000

Threads in C++

Question:
Is it possible to have threads in C++ like you can in Java?

Answer:
Sure you can have threads in C++. However, unlike Java, C++ uses external thread libraries for this purpose. For example, Windows programmers normally use the Win API thread functions or MFC classes; Unix and Linux programmers usually use the pthreads library. This ensures high performance and maximal flexibility because the underlying implementation of threads and their performance are platform-dependent.

To enable thread support, C++ provides the 'volatile' keyword and the sig_atomic_t data type.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap