Solved

Threads and synchronization

Posted on 2003-10-23
6
422 Views
Last Modified: 2010-04-01
Is there a way to start individual threads in C++? What about synchronization? Are there any equivalents to java threads and synchronized procedures?  If so, what are they called and what are the equivalents?

Thanks
0
Comment
Question by:jello32
6 Comments
 
LVL 40

Expert Comment

by:Kyle Abrahams
ID: 9611563
yes you can start threads in C++, what OS you looking to do it in.  As for synchronized, they may have some, but you can always write your own.
0
 
LVL 86

Expert Comment

by:jkr
ID: 9611585
>>Is there a way to start individual threads in C++?

What OS are you targetting?
0
 
LVL 7

Expert Comment

by:burcarpat
ID: 9611608
see,

    http://www.boost.org/libs/thread/doc/index.html

for a cross-platform ( i.e. os independent ) solution

[ about boost.org :: boost.org is an organization supported by many c++ standards committee members and provides 100% free, peer-reviewed, cross-platform libraries.  many of the boost libraries, such as their smart pointer library, are already in the drafts of the next revision of the c++ standard ]

-- ba
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:jello32
ID: 9611616
The os is windows.  How would I start threads?
0
 
LVL 7

Assisted Solution

by:burcarpat
burcarpat earned 40 total points
ID: 9611630
0
 
LVL 86

Accepted Solution

by:
jkr earned 60 total points
ID: 9611637
>>The os is windows.

Check out http://msdn.microsoft.com/library/en-us/dndllpro/html/msdn_threads.asp ("Multithreading for Rookies")
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question