pcp
[Top] [All Lists]

Re: [pcp] Python code vs local: host connections

To: Dave Brolley <brolley@xxxxxxxxxx>
Subject: Re: [pcp] Python code vs local: host connections
From: "Frank Ch. Eigler" <fche@xxxxxxxxxx>
Date: Wed, 18 Sep 2013 10:53:21 -0400
Cc: Nathan Scott <nathans@xxxxxxxxxx>, pcp@xxxxxxxxxxx
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <5239B2AB.1090703@xxxxxxxxxx>
References: <100234653.22684536.1379397669579.JavaMail.root@xxxxxxxxxx> <503959600.22684715.1379397714223.JavaMail.root@xxxxxxxxxx> <y0m61tzr1vf.fsf@xxxxxxxx> <y0m7gefp6ch.fsf@xxxxxxxx> <1441116249.23522135.1379458886089.JavaMail.root@xxxxxxxxxx> <20130917234342.GC31394@xxxxxxxxxx> <5239B2AB.1090703@xxxxxxxxxx>
User-agent: Mutt/1.4.2.2i
Hi -

On Wed, Sep 18, 2013 at 10:03:23AM -0400, Dave Brolley wrote:
> [...]
> I'm confused. fche and I discussed this on IRC and (Nathan later 
> approved) and that the slightly leaky solution was chosen because it is 
> thread safe. 

Yes.

> What's the point of replacing one thread-unsafe solution (race) with
> another one (static buffer)? Is correctness not a higher priority?

The static-buffer race is less bad than the previous one (returning
pointers into dynamic structures), and theoretically an app can
protect itself (via its own external locks).  Memory leaks are also an
incorrectness (and we don't have API/ABI measures to let an
application avoid them).

- FChE

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