-
Notifications
You must be signed in to change notification settings - Fork 4
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
Basic Refactoring: Type Annotations, Final & Const Usage #33
Conversation
Hi @Marc-R2 Please let me know if a package or your opinion suggests those changes? I'm on the way to find a package that has better suggestions than regular Thank you for your PR. |
These changes are based on some lint-rules from the very_good_analysis 6.0.0 (rules) package. I like this package, but sometimes some of the rules are a bit harsh. I usually disable (or ignore) at least I would be happy to add more of these lints if you want. |
# Conflicts: # test/isolate_manager_shared_test.dart
Thank you. I’ll merge your code and add the |
# Conflicts: # test/isolate_manager_shared_test.dart
# Conflicts: # bin/generate_single.dart
lib/src/isolate_manager.dart
Outdated
// Mark the current isolate as busy. | ||
_isolates[isolate] = true; | ||
|
||
// Send the `param` to the isolate and wait for the result. | ||
isolate.sendMessage(queue.params).then((value) { | ||
await isolate.sendMessage(queue.params).then((value) { |
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.
We should wrap this code with unawaited
instead of using await
here because we already used queue.completer.future
in return.
We should wrap this code with unawaited instead of using await here because we already used queue.completer.future in return.
LGTM! Thank you for your contributions. |
This PR introduces some basic refactoring to improve code readability and maintainability:
final
where applicable to ensure immutabilityconst
for constant values (optimize performance)These changes don't affect the functionality of the package but should improve the overall code quality.
I will continue to break down the larger changes into smaller PRs for easier review and integration.
Thanks!