Skip site navigation (1) Skip section navigation (2)

Re: libpq Win32 Mutex performance patch

From: Andrew Chernow <ac(at)esilo(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: libpq Win32 Mutex performance patch
Date: 2008-04-11 18:56:36
Message-ID: 47FFB464.3010307@esilo.com (view raw or flat)
Thread:
Lists: pgsql-patches
Magnus Hagander wrote:

 >It changes the behavior when the pointer passed in is invalid from
 >crash to silent working, right?

Correct, it a Habit.  I sub-consciously write code that checks pointers. 
  We can remove the pointer checks and let the thing dump core if people 
prefer.

> Which brings up the second point - is there any actual reason for
> adding the pthread_mutex_destroy call? Since libpq never calls it, and
> it's never used from outside libpq (it's not exported outside the
> library even), isn't it just going to end up as dead code?
> 
> //Magnus
> 

The destroy call is within a comment.  I only put it there in case it is 
ever needeed.  BTW, I just noticed the commented destroy call forgot to 
free(*mp) ... ooppssseee.

-- 
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/

In response to

Responses

pgsql-patches by date

Next:From: Merlin MoncureDate: 2008-04-11 18:58:17
Subject: Re: libpq Win32 Mutex performance patch
Previous:From: Magnus HaganderDate: 2008-04-11 18:49:34
Subject: Re: libpq Win32 Mutex performance patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group