PGConnection.getNotifications(0) doesn't block

From: Pawel Veselov <pawel(dot)veselov(at)gmail(dot)com>
To: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: PGConnection.getNotifications(0) doesn't block
Date: 2023-08-03 14:04:08
Message-ID: CAMnJ+Bf7STMy2DwKjT12dxT-j+Han1KoVSkmFZ9Otuwd6to+DA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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?

Thank you.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Pawel Veselov 2023-08-03 14:39:18 Re: PGConnection.getNotifications(0) doesn't block
Previous Message Laurenz Albe 2023-07-24 05:53:07 Re: Executing the same query multiple times gets slow