Re: PGConnection.getNotifications(0) doesn't block

Поиск
Список
Период
Сортировка
От Pawel Veselov
Тема Re: PGConnection.getNotifications(0) doesn't block
Дата
Msg-id CAMnJ+Bcb3CO-B9M-hwqOdaTvytUDReA-7S2xd2GA00AapXraLw@mail.gmail.com
обсуждение исходный текст
Ответ на PGConnection.getNotifications(0) doesn't block  (Pawel Veselov <pawel.veselov@gmail.com>)
Список pgsql-jdbc
Hello.

On Thu, Aug 3, 2023 at 4:04 PM Pawel Veselov <pawel.veselov@gmail.com> wrote:
>
> Hello.
>
> I'm implementing a bit that is expected to wait for published channel
> notifications,
> and once there are any - process them.
>
> I'm using PGConnection.getNotifications(0), but that immediately
> returns an empty
> array, and doesn't block like JavaDoc says it should.
>
> I'm on 42.6.0.
>
> What am I missing?

The transaction state is not IDLE, that's what's missing.
But JavaDoc doesn't mention that bit.



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

Предыдущее
От: Pawel Veselov
Дата:
Сообщение: PGConnection.getNotifications(0) doesn't block
Следующее
От: rob stone
Дата:
Сообщение: Re: PGConnection.getNotifications(0) doesn't block