Skip to content

Fix several concurrency issues #563

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

Merged
merged 1 commit into from
Oct 29, 2020
Merged

Fix several concurrency issues #563

merged 1 commit into from
Oct 29, 2020

Conversation

mvanbeusekom
Copy link
Member

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Bug fixes

⤵️ What is the current behavior?

There are currently a few related bugs in the geolocator:

  • When calling getCurrentPosition after getPositionStream the stream will be cancelled when getCurrentPosition completes;
  • When calling getCurrentPosition twice (before the first is finished) the first call gets forgotten and will be ignored (leak);
  • In some cases the getPositionStream is not closed correctly which makes it run forever.

🆕 What is the new behavior (if this is a feature change)?

This PR solves the above problems.

💥 Does this PR introduce a breaking change?

No

🐛 Recommendations for testing

📝 Links to relevant issues/docs

🤔 Checklist before submitting

  • All projects build
  • Follows style guide lines (code style guide)
  • Relevant documentation was updated
  • Rebased onto current develop

@codecov
Copy link

codecov bot commented Oct 29, 2020

Codecov Report

Merging #563 into develop will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           develop      #563   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           16        15    -1     
  Lines          248       214   -34     
=========================================
- Hits           248       214   -34     
Impacted Files Coverage Δ
...src/implementations/method_channel_geolocator.dart 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d39d7e2...7d5f2eb. Read the comment docs.

@mvanbeusekom mvanbeusekom modified the milestone: geolocator_v6.1.2 Oct 29, 2020
@mvanbeusekom mvanbeusekom merged commit 83319a9 into develop Oct 29, 2020
@mvanbeusekom mvanbeusekom deleted the issue/546 branch October 29, 2020 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment