Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

threads in c/c++

Posted on 2000-05-03
10
Medium Priority
?
203 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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 150 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

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…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
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 user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

636 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