Improve async processing and error handling #26
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@mskrzypkows Here is the PR for your #23
I've added some important improvements that help to to keep the code easy to maintain. In Rust, it's easy to open a branch of hell, so it's important to give the compiler everything that can be explicitly undeclared for now.
The PR:
thiserror
, it's the main tempter :) prefer usinganyhow
as long as possibletokio
thread (try to use a single processing routine), separate couroutines are extremelly challenging to debug. I took the risk again in SFFL and agreed to prematurely spawn coroutines, and I still regret it 😢 Use a single coroutine with a sequence of operations. Don't worry about performance now.The best Rust development flow is to follow the steps:
Easy and Compact Implementation -> Intensive Refactoring -> Optimization
I don't mind these things, we will need them, but they are more like decoration. For now, let's bake the cake first 🍰
I refactored the code but haven't tested it. Could you please check it?