pcp
[Top] [All Lists]

Re: [pcp] Steps towards a thread-safe libpcp

To: kenj@xxxxxxxxxxxxxxxx
Subject: Re: [pcp] Steps towards a thread-safe libpcp
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Tue, 22 Mar 2011 13:23:18 +1100 (EST)
Cc: pcp@xxxxxxxxxxx
In-reply-to: <1300748129.12077.86.camel@xxxxxxxxxxxxxxxx>
----- Original Message -----
> Making libpcp threadsafe is a (stretch) goal for PCP 4.0.
> 
> I've started this work, but need some feedback and consensus from the
> broader PCP community before going too far.
> 
> Specifically,
> 
> 1. Are pthreads the right abstraction to be using as the basis ...
> and first, does the attached code fragment compile without
> warnings, link with -lpthread, run and produce the output
> "Congratulations, you're in a bozo-free zone"?
> 2. Do we want to drag libpthread into every PCP app? ... this seems
> unavoidable, as we need some mutex services, even if the library
> itself is not multi-threaded.
> 
> The code works as expected on ia32 Ubuntu and Mac OS X 10.6 ... I'd be
> keen to get confirmation from others with access to a more varied set
> of platforms ... e.g. RedHat and SuSE variants, Solaris, Windows,
> x86_64, ...
> 

Works fine on RHEL5, x86_64.  Windows will be interesting, of course.  I
can see one mature open source solution there which will probably be the
go ... will take a little while to evaluate that though.

I don't think there's any other viable solution to threading given our
code base and supported platforms - pthreads will have to do I think.

cheers.

-- 
Nathan

<Prev in Thread] Current Thread [Next in Thread>