-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start work on async listen #264
Conversation
What's the state of this @fabianfett? |
Hi @pepicrft, thanks for reaching out. I haven't touched this for quite a while and I'd be happy for someone else to drive this forward. Are you interested? If that's the case I will write down my thoughts on this, to make getting started easier. |
Very interested indeed. Would you brain-dumping everything in this issue? |
af7e471
to
2713191
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #264 +/- ##
==========================================
+ Coverage 43.88% 46.88% +3.00%
==========================================
Files 107 110 +3
Lines 8596 8988 +392
==========================================
+ Hits 3772 4214 +442
+ Misses 4824 4774 -50
|
Hi @pepicrft, I sat down last night and tried to move this forward so that you can have an idea of where I want this to go. Please be well aware that the code is totally undertested and that likely only the happy path works. I'd really appreciate help here. However if you say this is already "too" done, and you are not interested in helping out anymore that is understandable. In that case you have a very bar bones implementation that you might be able to use. But first let me discuss design goals:
Next let me explain, what types I've added and how all of this works together:
Feel free to use the commit in this PR and add further commits (by opening a new PR), that finalize the implementation and add tests. For an example on how to test a state machine, check out the How does all of this sound to you @pepicrft? Small note: I'll be on vacation starting tomorrow until July 3. For this reason I might be slow to respond. |
Sounds perfect and thanks a lot for the thorough update on the state of things. I won't be able to dedicate myself full-time to it, but I hope to make some progress before you are back from vacation 😊. |
@fabianfett I got side-tracked with some work on Tuist and I won't be able to work on this 😞. I'll be following the progress made here though. |
2713191
to
1a3dd3a
Compare
64929f1
to
f42e0f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor nits, otherwise lgtm
id: Int, | ||
eventLoop: EventLoop, | ||
context: PostgresListenContext, | ||
closure: @escaping (PostgresListenContext, PostgresMessage.NotificationResponse) -> Void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be @Sendable
?
Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
API break checker reports a false positive:
|
Motivation
We want to translate all our APIs to async.
Changes
listen(_: String) -> PostgresNotificationSequence
functionResult
Async listen is possible.