Re: Will PQregisterThreadLock() be documented? - Mailing list pgsql-docs

From Bruce Momjian
Subject Re: Will PQregisterThreadLock() be documented?
Date
Msg-id 200510161715.j9GHFjq22193@candle.pha.pa.us
Whole thread Raw
In response to Re: Will PQregisterThreadLock() be documented?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Will PQregisterThreadLock() be documented?
List pgsql-docs
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Volkan YAZICI wrote:
> >> Will PQregisterThreadLock() - which is defined globally in
> >> src/interfaces/libpq/fe-connect.c - be documented?
>
> > Yes, it should be documented.
>
> Really?  Do we intend applications to call it?

Uh, well, we never call it ourselves, so if we don't expect other
applications to call it, why is it there?

Our code has:

    /*
     *     Used to set callback that prevents concurrent access to
     *     non-thread safe functions that libpq needs.
     *     The default implementation uses a libpq internal mutex.
     *     Only required for multithreaded apps that use kerberos
     *     both within their app and for postgresql connections.
     */
    typedef void (*pgthreadlock_t) (int acquire);

    extern pgthreadlock_t PQregisterThreadLock(pgthreadlock_t newhandler);

We need to research why it was added.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-docs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Will PQregisterThreadLock() be documented?
Next
From: Tom Lane
Date:
Subject: Re: Will PQregisterThreadLock() be documented?