-
Notifications
You must be signed in to change notification settings - Fork 13
Components refactor #35
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
Conversation
|
|
||
| [patch.crates-io] | ||
| abscissa_core = { git = "https://github.com/str4d/abscissa.git", rev = "8da8e10cad02aa4a93099cb4942b48fbdc54eb89" } | ||
| abscissa_tokio = { git = "https://github.com/str4d/abscissa.git", rev = "8da8e10cad02aa4a93099cb4942b48fbdc54eb89" } |
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.
This is iqlusioninc/abscissa#985.
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.
Reviewed that PR.
49174de to
3542cbd
Compare
|
|
||
| info!("Spawned Zallet tasks"); | ||
|
|
||
| // ongoing tasks. |
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.
(Not specific to this PR.)
Does pin! have a side effect causing its argument to be pinned in the current scope, or is the pin dependent on holding the returned Pin<_>? From reading the docs for std::pin, Pin<_>, and the examples for the pin! macro, I thought it was the latter.
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.
Oh this is tokio::pin!, not std::pin::pin!. That is sufficiently confusing (and the semantics sufficiently different) that I would prefer to see an explicit tokio::pin!(...).
|
|
||
| Ok::<_, Error>(()) | ||
| }) | ||
| .map_err(|e| FrameworkErrorKind::ComponentError.context(e))?; |
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.
| .map_err(|e| FrameworkErrorKind::ComponentError.context(e))?; | |
| .map_err(|e: Error| FrameworkErrorKind::ComponentError.context(e))?; |
| Ok::<(), Error>(()) | ||
| })?; | ||
|
|
||
| Ok::<_, Error>(()) |
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.
| Ok::<_, Error>(()) | |
| Ok(()) |
| Err(e) => Err(ErrorKind::Init.context(e)), | ||
| }?; | ||
|
|
||
| Ok::<(), Error>(()) |
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.
| Ok::<(), Error>(()) | |
| Ok(()) |
| info!("Creating empty database"); | ||
| } | ||
| let handle = self.handle().await?; | ||
| handle.with_mut(|mut db_data| { |
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.
| handle.with_mut(|mut db_data| { | |
| handle.with_mut(|mut db_data| -> Result<_, Error> { |
(Non-blocking refactoring, together with the 3 suggestions below.)
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.
utACK with non-blocking suggestions.
Stacked on #34.