Solved

Threads and synchronization

Posted on 2003-10-23
6
420 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 39

Expert Comment

by:Kyle Abrahams
Comment Utility
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
Comment Utility
>>Is there a way to start individual threads in C++?

What OS are you targetting?
0
 
LVL 7

Expert Comment

by:burcarpat
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

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

Assisted Solution

by:burcarpat
burcarpat earned 40 total points
Comment Utility
0
 
LVL 86

Accepted Solution

by:
jkr earned 60 total points
Comment Utility
>>The os is windows.

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now