473,403 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

standar C++ and threads; any Poxis lib?

I have been reading for a while and trying to make something I was asked.
Make a simple C++ library thread safe. I develop under Linux and the
library must be as Posix-fic as possible. Now the problem is the
standard C++ itself has no Threading whatsoever, windows platform deals
with its own threads' library, while in Linux... there are plenty.
due my case, what is the approach: what Linux C++ library has posix
threads. I heard they went into the kernel and many nuisances, but I
don't really know what to use and HOW!!
Diego Alonso
Jul 22 '05 #1
5 1839
Diego Alonso González wrote:
I have been reading for a while and trying to make something I
was asked. Make a simple C++ library thread safe. I develop under
Linux and the library must be as Posix-fic as possible. Now the problem is the standard C++ itself has no Threading
whatsoever,


Correct; ergo, you are in the wrong newsgroup. Try asking in a
Linux/programming group.

Regards,

--
Lionel B

Jul 22 '05 #2
> I have been reading for a while and trying to make something I was asked.

Does this article give you any ideas for your homework?
http://en.wikipedia.org/wiki/Thread_...ter_science%29

Make a simple C++ library thread safe. I develop under Linux and the
library must be as Posix-fic as possible. Now the problem is the
standard C++ itself has no Threading whatsoever, windows platform deals
with its own threads' library, while in Linux... there are plenty.
The standardization is on the way...
http://pluralsight.com/blogs/hsutter...0/23/2972.aspx

due my case, what is the approach: what Linux C++ library has posix
threads. I heard they went into the kernel and many nuisances, but I
don't really know what to use and HOW!!


Did you try any portable classes that work with NPTL?

Regards,
Markus
Jul 22 '05 #3
KB
Diego Alonso González wrote:
I have been reading for a while and trying to make something I was asked.
Make a simple C++ library thread safe. I develop under Linux and the
library must be as Posix-fic as possible. Now the problem is the
standard C++ itself has no Threading whatsoever, windows platform deals
with its own threads' library, while in Linux... there are plenty.
due my case, what is the approach: what Linux C++ library has posix
threads. I heard they went into the kernel and many nuisances, but I
don't really know what to use and HOW!!
Diego Alonso


As you've been able to ascertain, Standard C++ has no thread classes
associated with its library.

That being said, check out http://www.boost.org.

KB

Jul 22 '05 #4
KB
Markus Elfring wrote:
The standardization is on the way...
http://pluralsight.com/blogs/hsutter...0/23/2972.aspx


Cool blog. Thanks for the post even though it was for the benefit of the OP.

Having the shared_ptr and the regex libs added to the standard would be very
nice. They both ROCK!

I am surprised that threads are being considered (pleasantly surprised).

Again, thanks.

KPB
Jul 22 '05 #5
Markus Elfring wrote:
I have been reading for a while and trying to make something I was asked.
....
due my case, what is the approach: what Linux C++ library has posix
threads. I heard they went into the kernel and many nuisances, but I
don't really know what to use and HOW!!

Did you try any portable classes that work with NPTL?


Austria C++ also has a "posix like" model (it's posix underneath on
Unix/Linux and uses Win32 API's on Windows) but the API is pure C++.
Jul 22 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ronan Viernes | last post by:
Hi, I have created a python script (see below) to count the maximum number of threads per process (by starting new threads continuously until it breaks). ###### #testThread.py import...
0
by: Al Tobey | last post by:
I was building perl 5.8.2 on RedHat Enterprise Linux 3.0 (AS) today and noticed that it included in it's ccflags "-DTHREADS_HAVE_PIDS." I am building with -Dusethreads. With newer Linux...
6
by: m | last post by:
Hello, I have an application that processes thousands of files each day. The filenames and various related file information is retrieved, related filenames are associate and placed in a linked...
34
by: Kovan Akrei | last post by:
Hi, I would like to know how to reuse an object of a thread (if it is possible) in Csharp? I have the following program: using System; using System.Threading; using System.Collections; ...
7
by: Mr. Mountain | last post by:
In the following code I simulate work being done on different threads by sleeping a couple methods for about 40 ms. However, some of these methods that should finish in about 40 -80 ms take as long...
3
by: bygandhi | last post by:
Hi - I am writing a service which will check a process and its threads for their state ( alive or dead ). The process has 5 .net managed threads created using thread.start and each have been...
10
by: [Yosi] | last post by:
I would like to know how threads behavior in .NET . When an application create 4 threads for example start all of them, the OS task manager will execute all 4 thread in deterministic order manes,...
3
by: mjheitland | last post by:
Hi, I like to know how many threads are used by a Threading.Timer object. When I create a Threading.Timer object calling a short running method every 5 seconds I expected to have one additional...
10
by: Darian | last post by:
Is there a way to find all the thread names that are running in a project? For example, if I have 5 threads T1, T2, T3, T4, T5...and T2, T4, and T5 are running...I want to be able to know that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.