Re: How to use PQconsumeInput and PQisBusy correctly ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to use PQconsumeInput and PQisBusy correctly ?
Дата
Msg-id 18233.1110740054@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to use PQconsumeInput and PQisBusy correctly ?  ("Rodrigo Moreno" <rodrigo.miguel@terra.com.br>)
Ответы RES: How to use PQconsumeInput and PQisBusy correctly ?  ("Rodrigo Moreno" <rodrigo.miguel@terra.com.br>)
Список pgsql-interfaces
"Rodrigo Moreno" <rodrigo.miguel@terra.com.br> writes:
> What's the right way to use pqconsumeinput and pqisbusy ?
> The below code could be used to do that ? 

It would work but it seems rather pointless; the only reason you would
use those functions is if you have something else useful to do while
waiting for the query result ... and this program structure isn't
very conducive to doing other stuff while waiting.  Usually you'd want
to have a main loop that can dispatch handling of various events, one
of them being checking for an available query result.

The whole thing is a bit of a stone-age technique anyway; if you were
thinking of starting a new program today you'd probably use threads in
preference to an event loop.
        regards, tom lane


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

Предыдущее
От: "Rodrigo Moreno"
Дата:
Сообщение: How to use PQconsumeInput and PQisBusy correctly ?
Следующее
От: "Rodrigo Moreno"
Дата:
Сообщение: RES: How to use PQconsumeInput and PQisBusy correctly ?