pthreads
Hi,
Simon Martin writes:
> Environment: slink, g++ (egcs-2.91.60), libc6-2.0.7.19881
>
> Hi,
>
> I am developing a C++ socket class that I wish to operate completely
> independently from the caller. To do this, I am trying to use pthreads to
> spawn a listening thread that will handle all coenection requests. I do this
> quite often and succesfully on NT, but when I compile with g++ I get the
> error that it can't find "pthread_create" or "pthread_join", two functions I
> use. I tried explicitly telling g++ to use the /lib/libpthreads-0.7-1.so,
> but it still comes back with the same error. This seams to be the only
> pthread on my system so I wonder what's going on.
>
> Secondly I am assuming that the pthread implementation is similar to the
> Win32 implementation is as much a thread of execution is assigned by the
> scheduler and shares process memory and resources with all the other threads
> defined for that process. I seem to remember something about all threads
> sharing the processes time quanta, but if anyone wants to expound I would be
> very obliged.
Have you considered using ACE? It is an excellent toolkit _and_ it is
part of the main Debian distribution, hence it is DFSG-free! It
provides a standard thread interface across, POSIX threads, UNIX
International and Win32 threads, and much much more. ACE is the
Adaptive Communications Environment, a C++ toolikit/framework. It
even provides a standard interface for socket programming across UNIX and Win32. It really is a great
library. Check out the description of the "libace4.6" set packages in
dselect for good synopsis of what ACE can do.
I happen to be in the research group that develops ACE so please excuse
my "advertising." :)
If you want more information on ACE, please go to:
http://www.cs.wustl.edu/~schmidt/ACE.html
HTH,
-Ossama
______________________________________________________________________
Ossama Othman <othman@cs.wustl.edu>
58 60 1A E8 7A 66 F4 44 74 9F 3C D4 EF BF 35 88 1024/8A04D15D 1998/08/26
Reply to:
- Follow-Ups:
- pthreads
- From: Ossama Othman <othman@cs.wustl.edu>
- References:
- pthreads
- From: "Simon Martin" <smartin@isys.cl>