Solved

threads in c/c++

Posted on 2000-05-03
10
196 Views
Last Modified: 2010-04-02
Is thread  possible in C/C++?? if so how??
0
Comment
Question by:prasen120998
  • 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

 
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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, free, private online code repository / editor 7 106
IdTCPClient1->Disconnect(); not working 3 76
Unresolved External Symbols 3 104
Issues with C++ Class 19 101
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
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 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.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

856 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