Re: Win32 Thread safetyness

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Win32 Thread safetyness
Дата
Msg-id 200508282158.j7SLwKo28790@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Win32 Thread safetyness  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Magnus Hagander wrote:
> >>> Also, there doesn't seem to be a good way for users to know 
> >>> if libpq or ecpg was compiled to be thread-safe.
> >> 
> >> Right. A runtime function for this might be a good thing? Like "bool
> >> PQisThreadSafe()" or such?
> 
> > Yes, and a flag to ecpg.  Added to TODO:
> 
> Um, it's not clear *when* you need to know this:
>     - application configure time?
>     - application compile time?
>     - application link time?
>     - application run time?
> 
> Of those possibilities, "add a function" responds to only one, and it's
> the one I can see least use-case for.  I should think that by run-time
> it's probably too late to do much about it other than fail.

Yea, I am thinking a libpq function would say "libpq not thread-safe'
and return an error.  I would think pg_config output would be fine for
any link or compile-time check.

> You can find out whether thread-safety was mentioned in our configure
> settings by looking at the result of pg_config --configure.  This might
> be enough for the find-out-at-configure-time case.

True.

--  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,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Win32 Thread safetyness
Следующее
От: Bruce Momjian
Дата:
Сообщение: Upcoming conferences for me