Solved

threads in c/c++

Posted on 2000-05-03
10
198 Views
Last Modified: 2010-04-02
Is thread  possible in C/C++?? if so how??
0
Comment
Question by:prasen120998
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +4
10 Comments
 
LVL 5

Expert Comment

by:pitonyak
ID: 2776046

Look up _beginthread depending on the compiler that you use it will probably be similar to

_beginthread(pointer_to_func_to_run, NULL, stackSize, Handle);

What system and compiler are you using?

I have used this on linux, windows, and OS/2.


0
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 2776156
If you want , i can send you simple full example using threads in c/c++ for
windows(write you EMail).
0
Industry Leaders: 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!

 
LVL 1

Expert Comment

by:xutao
ID: 2776178
0
 

Expert Comment

by:forza
ID: 2776459
If you're using Linux then try Pthreads!
0
 
LVL 3

Accepted Solution

by:
Iexpert earned 50 total points
ID: 2777207
Use a standard interface so you can port you threading software
around various platforms.

The best available at the moment is pthreads which is available
on Linux & Win32 etc.

The Win32 port of pthreads is @ http://sourceware.cygnus.com/pthreads-win32/

Just search the www for pthreads and you should find
loads of tutorial/reference material.
0
 

Expert Comment

by:forza
ID: 2777368
Yes pthreads works in Windows too...
I'm using pthreads myself with Linux on my dual Celeron and it's just great.

Here's a good link: http://www-rcd.cc.purdue.edu/Paragon/Docs/Intel/Manuals/psug/psug_52.html
0
 

Expert Comment

by:jpalmeroesteban
ID: 2862938
if the operating system has threads is possible that he has an api
0
 

Author Comment

by:prasen120998
ID: 3023107
Comment accepted as answer
0
 

Author Comment

by:prasen120998
ID: 3023108
Thanks others also, for their valuable comments...
0

Featured Post

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!

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

728 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