|
-
January 14th, 2011, 08:53 PM
#1
Equivalent of "Thread" java in C++
Hi All,
I am new member , my name is Javin Paul.
I have used Thread in java a lot but not used in C++ , can any one please guide me what is equivalent of java Thread in C++ ?
Thanks
Javin
-
January 15th, 2011, 06:09 AM
#2
Re: Equivalent of "Thread" java in C++
std::thread isn't supported by any compilers yet, so in the mean time you can use boost::thread.
Cheers, D Drmmr
Please put [code][/code] tags around your code to preserve indentation and make it more readable.
As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky
-
January 15th, 2011, 07:39 AM
#3
Re: Equivalent of "Thread" java in C++
MFC library also implements CWinThread class.
If not using MFC, boost, or other library, it's no sweat to implement your own Thread class based on CreateThread Windows API function.
I can presume that "Thread" you have mentioned in OP is part of a Java library/framework and not of Java language.
-
February 7th, 2011, 04:40 AM
#4
Re: Equivalent of "Thread" java in C++
"javinpaul" thread is something which is very OS specific , java abstracted the idea and made is part of the language construct within Java , however C++ is as basic you can get without getting OS specific . if you are looking for something which is OS neutral as in Java , then head over to QT
as in
http://qt.nokia.com , think of it as C++ which works across all platforms.
-
February 7th, 2011, 05:40 AM
#5
Re: Equivalent of "Thread" java in C++
Be sure that every language, library or framework has OS-specific stuff behind.
Once the question was posted in Visual C++ & C++ Programming > Multithreading forum, I can presume that desired target OS is Windows.
IMO, if cross-platform is not a must, then choosing a third-party little cute "OS neutral" monster like Qt, is not a very brilliant solution.
-
February 7th, 2011, 07:47 AM
#6
Re: Equivalent of "Thread" java in C++
some people have spend so much time doing Micro**ft stuff they can't think beyond it , lets face it they are struggling with one OS , how would they comprehend 3 or 4 ,
Maya 2011 from Autodesk responsible , top quality Hollywood animation and special effects was developed in QT for windows mac and Linux. It has produced web kit , now used by MAC in safari browser , over 20000 cross platform applications have used it , not to mention the KDE for linux is based on QT UI framework.
Language is only the tools , it is neither good or bad , it your own effort and understanding
QT has over 15 years of development and proven track record behind it , what they have achieved in term of language maturity is yet to be achieved by any C++ implementation including MS
Last edited by aamir121a; February 7th, 2011 at 08:02 AM.
-
February 7th, 2011, 11:01 AM
#7
Re: Equivalent of "Thread" java in C++
 Originally Posted by aamir121a
some people have spend so much time doing Micro**ft stuff they can't think beyond it , lets face it they are struggling with one OS , how would they comprehend 3 or 4 ,
Maya 2011 ...
When you are saying that some people are hooked in one OS and "can't think beyond it", then it's fair to say the same about the ones hooked in something like Qt. 
Just I have expressed one opinion in a Visual C++ forum, in a thread in which nobody asked about cross-platform.
From my side, there was not any intention to argue and/or start a flame about how great are whatever concepts, technologies or companies.
Pease respect my opnion, then I'll respect yours!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|