Skip to content
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

Switch many Device methods to be async #9587

Merged
merged 5 commits into from
Apr 26, 2017
Merged

Switch many Device methods to be async #9587

merged 5 commits into from
Apr 26, 2017

Conversation

tvolkert
Copy link
Contributor

adb can sometimes hang, which will in turn hang the Dart isolate if
we're using Process.runSync(). This changes many of the Device methods
to return Future<T> in order to allow them to use the async process
methods. A future change will add timeouts to the associated calls so
that we can properly alert the user to the hung adb process.

This is work towards #7102, #9567

`adb` can sometimes hang, which will in turn hang the Dart isolate if
we're using `Process.runSync()`. This changes many of the `Device` methods
to return `Future<T>` in order to allow them to use the async process
methods. A future change will add timeouts to the associated calls so
that we can properly alert the user to the hung `adb` process.

This is work towards #7102, #9567
@@ -110,9 +110,9 @@ class AndroidDevice extends Device {
@override
String get sdkNameAndVersion => 'Android $_sdkVersion (API $_apiVersion)';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to await _sdkVerion and _apiVersion here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch - done.

@goderbauer
Copy link
Member

LGTM

@tvolkert tvolkert merged commit 60c5ffc into flutter:master Apr 26, 2017
@tvolkert tvolkert deleted the async branch April 26, 2017 00:23
a-siva added a commit that referenced this pull request Jul 2, 2019
* Manual roll of engine 45b66b7...ffba2f6

git log 45b66b7...ffba2f6 --oneline

ffba2f6 Roll src/third_party/dart b37aa3b036...0abff7b2bb (#9588)
62514cb Roll fuchsia/sdk/core/mac-amd64 from n9fZpXVmsbgKZzS8Q2GXxB453q8AbLpfGztsPsq47pMC to BYCwsJf7r7zfd2THSGinFeIHv552AEVchXdc7VZzP0IC (#9587)
9f27212 Roll src/third_party/skia e4c88bb1f848..1ddee025229a (7 commits) (#9586)
03a31e0 Roll fuchsia/sdk/core/linux-amd64 from F9oY0d56X3aONxwv5vw9Gco--AHmC8SHuDXdhdWCnnMC to d2VK3FYSEKQ35UdZw5FdbOZUI_xgT0-1h8DnGDUHPVAC (#9583)

* Fix analyzer warning.
johnsonmh pushed a commit to johnsonmh/flutter that referenced this pull request Jul 30, 2019
* Manual roll of engine 45b66b7...ffba2f6

git log 45b66b7...ffba2f6 --oneline

ffba2f6 Roll src/third_party/dart b37aa3b036...0abff7b2bb (flutter#9588)
62514cb Roll fuchsia/sdk/core/mac-amd64 from n9fZpXVmsbgKZzS8Q2GXxB453q8AbLpfGztsPsq47pMC to BYCwsJf7r7zfd2THSGinFeIHv552AEVchXdc7VZzP0IC (flutter#9587)
9f27212 Roll src/third_party/skia e4c88bb1f848..1ddee025229a (7 commits) (flutter#9586)
03a31e0 Roll fuchsia/sdk/core/linux-amd64 from F9oY0d56X3aONxwv5vw9Gco--AHmC8SHuDXdhdWCnnMC to d2VK3FYSEKQ35UdZw5FdbOZUI_xgT0-1h8DnGDUHPVAC (flutter#9583)

* Fix analyzer warning.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants