Re: Aim of --enable-thread-safety ?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Aim of --enable-thread-safety ?
Дата
Msg-id 20060710181545.GG17723@svana.org
обсуждение исходный текст
Ответ на Re: Aim of --enable-thread-safety ?  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-general
On Mon, Jul 10, 2006 at 01:39:44PM -0400, Bruce Momjian wrote:
> Uh, the documentation is very clear on the purpose of this option:
>
>        <term><option>--enable-thread-safety</option></term>
>        <listitem>
>         <para>
>          Make the client libraries thread-safe.  This allows
>          concurrent threads in <application>libpq</application> and
>          <application>ECPG</application> programs to safely control
>          their private connection handles.  This option requires adequate
>          threading support in your operating system.
>
> Is there something unclear about it?

Not sure. The way I read it, it doesn't say that it's also important
even if the multithreaded program only has one connection (it uses the
word "handles"). Someone posted a problem not so long ago where he'd
figured he didn't need thread-safety because he was only using one
connection, but it still broke if libpq was called from anything other
than the main thread.

If there is any possibility libpq is going to come in contact with a
multithreaded program (even via a loaded plugin or whatever) you must
have thread-safety enabled or things are likely to break.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: marcelo Cortez
Дата:
Сообщение: encoding bug or feature?
Следующее
От: Jorge Godoy
Дата:
Сообщение: Re: encoding bug or feature?