parse-community / Parse-SDK-Android

The Android SDK for Parse Platform
https://parseplatform.org/
Other
1.88k stars 739 forks source link

fix: exception on concurrent download of `ParseFile` from multiple threads #1180

Closed rommansabbir closed 1 year ago

rommansabbir commented 1 year ago

New Pull Request Checklist

Issue Description

Related issue: https://github.com/parse-community/Parse-SDK-Android/issues/1155

Approach

This PR simplifies the logic of fetchAsync method and then adds a concurrent code that blocks the second (and further) calling threads until the first thread finishes the download of ParseFile (or fails to do so).

TODOs before merging

parse-github-assistant[bot] commented 1 year ago

Thanks for opening this pull request!

codecov[bot] commented 1 year ago

Codecov Report

Merging #1180 (ec87160) into master (351858c) will not change coverage. The diff coverage is 0.00%.

@@          Coverage Diff           @@
##           master   #1180   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files         122     122           
  Lines        9962    9971    +9     
  Branches     1343    1345    +2     
======================================
- Misses       9962    9971    +9     
Impacted Files Coverage Ξ”
...e/src/main/java/com/parse/ParseFileController.java 0.00% <0.00%> (ΓΈ)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

rommansabbir commented 1 year ago

@mtrezza @L3K0V How to solve 'codecov/project' failing issue?

azlekov commented 1 year ago

@mtrezza can you help about failing checks

parseplatformorg commented 1 year ago

πŸŽ‰ This change has been released in version 4.1.0