Refactor listen/notify as a pubsub backend#6811
Refactor listen/notify as a pubsub backend#6811
Conversation
d976358 to
346574b
Compare
f25b950 to
6a9000d
Compare
| self.sentinel_r, self.sentinel_w = os.pipe() | ||
| os.set_blocking(self.sentinel_r, False) | ||
| os.set_blocking(self.sentinel_w, False) |
There was a problem hiding this comment.
Is this really related? I thought this os.pipe was primarily part of the select calls to receive the signals like SIGINT, SIGTERM.
There was a problem hiding this comment.
I added this to make the semantics of the PubSub readiness tied to the data it actually stores, which is the self.message_buffers queue (not the connection buffer). If I just use connection.connection, test_pubsub:111 fails as the pg_notify_callback is called automatically on same-process connections and is empty at this point.
But I don't feel very good about how complex this looks. I think using notifies may make our lives easier
aea9033 to
5e71216
Compare
6389b3a to
a04fa6a
Compare
a04fa6a to
a508837
Compare
This reverts commit 6e6879c.
a508837 to
cecf943
Compare
|
This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution! |
|
This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details. |


No description provided.