[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: C++ and threading howto for linux dev



In <[🔎] h5pk7i$bns$7@ger.gmane.org>, Emanoil Kotsev wrote:
>I'm willing to build an app that starts 3 threads, especially (soap
> client, server from libcsoap and terminal), so I couldn't manage to do
> the job in C++, because they it lacks native threading support. PThread
> lib is C.

I've always been able to use the pthread library from C++ as well.  You do 
need to make sure that your thread functions are callable from C, but that 
it rarely a problem.

>I also couldn't find a user-list for libcsoap, but the question is a
> general one - HOW THE H**L ARE YOU WRITING threaded apps in C++. It
> shouldn't be that hard - or is it?

1. POSIX/SUSv2 pthreads is a absolutely has to work with minimal 
dependencies on multiple UNIX-alike platforms.

2. Qt4 Threads for most things.  Qt4 Threads are arguably more portable than 
pthreads, and with modular Qt4, you don't have to pull in X11 libraries if 
you don't need them.

3. I hear boost has a threading library.  I've never used boost for 
anything, but if I couldn't use Qt4 or pthreads, I'd consider it.

4. C++1x should have native thread primitives and should be fairly close to 
complete.  Depending on how good your libstdc++/gcc support the soon-to-be 
standard interface you could write to this.
-- 
Boyd Stephen Smith Jr.           	 ,= ,-_-. =.
bss@iguanasuicide.net            	((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy 	 `-'(. .)`-'
http://iguanasuicide.net/        	     \_/

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: