-
Notifications
You must be signed in to change notification settings - Fork 178
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
feat!: add background method to builders with callback #1522
Conversation
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.
Looks good except some doc comments. Also as far as I understand this fix doesn't solve the problem with cancelling backgrounded entity yet?
/// } else { | ||
/// println!("Publisher has NO MORE matching subscribers."); | ||
/// } | ||
/// }) |
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.
there is no background()
call in the example
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.
Oups, indeed, it's fixed
pub fn undeclare_on_drop(mut self, undeclare_on_drop: bool) -> Self { | ||
self.undeclare_on_drop = undeclare_on_drop; | ||
self | ||
/// Background builder doesn't return a `MatchingListener` object anymore. |
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.
better to reformulate this, this is piece of documentation, not a comment to PR
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.
How do you want to reformulate?
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.
Something like this:
"Suppress returning MatchingListener
object from builder. The listener callback stays alive for the lifetime of the session ". Doesn't matter too much though
impl<'a, 'b> QueryableBuilder<'a, 'b, Callback<Query>> { | ||
/// Register the queryable callback to be run in background until the session is closed. | ||
/// | ||
/// Background builder doesn't return a `Queryable` object anymore. |
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.
same. User doesn't care that we have different variant of builders, background, not background. Better to describe how this option affects behavior
bfe39fa
to
3adbf75
Compare
No description provided.