-
Notifications
You must be signed in to change notification settings - Fork 0
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
Run response mapper in isolate #44
Conversation
4e2c1b8
to
0519b54
Compare
|
||
import 'package:dash_kit_network/dash_kit_network.dart'; | ||
|
||
// This is an abstract class for managing isolates It defines the basic methods |
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 an abstract class for managing isolates It defines the basic methods | |
// This is an abstract class for managing isolates. It defines the basic methods |
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.
Probably all those comments except ignore
should be doc comments with ///
instead of //
|
||
// Method for sending messages to the isolate. The `mapper` function is | ||
// executed in the isolate and the result is returned. | ||
Future<FutureOr<T>> send<T>( |
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.
Also if it is possible let's take into account the best practices for code documentation, for example from here: https://medium.com/codex/flutter-dart-documentation-791371ff2e0f
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.
Thx for style guides link.
9dd02b7
to
e4ba940
Compare
lib/src/isolate_manager/isolate_manager_io/isolate_manager.dart
Outdated
Show resolved
Hide resolved
lib/src/isolate_manager/isolate_manager_io/isolate_manager.dart
Outdated
Show resolved
Hide resolved
lib/src/isolate_manager/isolate_manager_io/isolate_manager.dart
Outdated
Show resolved
Hide resolved
lib/src/isolate_manager/isolate_manager_web/isolate_manager.dart
Outdated
Show resolved
Hide resolved
lib/src/isolate_manager/isolate_manager_web/isolate_manager.dart
Outdated
Show resolved
Hide resolved
lib/src/isolate_manager/isolate_manager_web/isolate_manager.dart
Outdated
Show resolved
Hide resolved
lib/src/isolate_manager/isolate_manager_web/isolate_manager.dart
Outdated
Show resolved
Hide resolved
lib/src/api_client.dart
Outdated
/// for updating tokens if they expired. | ||
/// Component for communication with an API. | ||
/// | ||
/// Includes functionality for updating tokens if they expired. |
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.
/// Includes functionality for updating tokens if they expired. | |
/// Includes functionality for updating tokens if they are expired. |
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.
Fixed it.
/// Method for sending messages to the isolate. | ||
/// | ||
/// The `mapper` function is executed in the isolate and the result is | ||
/// returned. Throws an assertion error if the isolate was stopped. |
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.
/// returned. Throws an assertion error if the isolate was stopped. | |
/// returned. Throws an assertion error if the isolate is stopped. |
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.
Description was rewritten.
/// ); | ||
/// ``` | ||
Future<FutureOr<T>> send<T>({ | ||
required Response<dynamic> response, |
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.
It is probably will be useful to have some info about the response
parameter in the doc section for this method
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.
Added it in interface class.
/// Listen for messages from the isolate manager. | ||
/// | ||
/// We shouldn't store and cancel subscription, because the isolate will be | ||
/// killed after will be call `IsolateManager.stop`. |
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.
/// killed after will be call `IsolateManager.stop`. | |
/// killed after `IsolateManager.stop` is called. |
e4ba940
to
8231640
Compare
/// Change the isolate status to initialized. | ||
@protected | ||
@mustCallSuper | ||
void setInitializedStatus() { |
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.
protected should be only for setInitializedStatus
, isn't it?
Increase the minor version, please |
No description provided.