doobie icon indicating copy to clipboard operation
doobie copied to clipboard

New approach to PostgreSQL NOTIFY/LISTEN handling

Open Dennis4b opened this issue 6 years ago • 0 comments

(Issue added on request after Gitter question)

With the new 6.0-branch changes (running queries on different ExecutionContexts, cats-effect scheduling and timer changes) there might be a more elegant way to listen for and stream PostgreSQL notifications that do not rely on a burnerthread and Thread.sleep calls.

All suggestions appreciated.

First improvement: replace HC.delay{ Thread.sleep(...) } with timer.sleep(...).to[ConnectionIO] (where timer is a Timer[IO], see cats-effect docs.). More suggestions welcome.

Dennis4b avatar Oct 01 '18 16:10 Dennis4b