Solved

threads in c/c++

Posted on 2000-05-03
10
197 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
 
LVL 1

Expert Comment

by:xutao
ID: 2776176
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Suggested Solutions

Title # Comments Views Activity
Fast access to array, using indexes, smart iterative search 2 128
Unresolved External Symbols 3 130
C++ mouse_event mouse look 7 112
What is sub-make ? 2 88
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
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 viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

726 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