libpq: Exact meaning of 'thread-safe'?

Поиск
Список
Период
Сортировка
От Florian Weimer
Тема libpq: Exact meaning of 'thread-safe'?
Дата
Msg-id tgae8h546f.fsf@mercury.rus.uni-stuttgart.de
обсуждение исходный текст
Список pgsql-interfaces
From the documentation:

| libpq is thread-safe as of Postgres 7.0, so long as no two threads
| attempt to manipulate the same PGconn object at the same time. In
| particular, you can't issue concurrent queries from different threads
| through the same connection object. (If you need to run concurrent
| queries, start up multiple connections.)

Is it safe to perform sequential queries from different threads to the
same object?  (On some systems, the process ID changes from thread to
thread, and this could have some side effects.)

Is it safe to assume that the accessor functions for connection
objects are task-safe and will remain it?

-- 
Florian Weimer                       Florian.Weimer@RUS.Uni-Stuttgart.DE
University of Stuttgart           http://cert.uni-stuttgart.de/
RUS-CERT                          +49-711-685-5973/fax +49-711-685-5898


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

Предыдущее
От: "Stathy Touloumis"
Дата:
Сообщение: Perl DBD Driver
Следующее
От:
Дата:
Сообщение: Re: Postgres ODBC