Solved

Threads and synchronization

Posted on 2003-10-23
6
423 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

735 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