[Bug]: Race condition possibility with setLocaleIdentifier
#198
Labels
P2
Important issues not at the top of the work list.
platform: android
Issue is related to the Android platform.
refactor
Issues marked with refactor should be considered when refactoring the plugin.
Please check the following before submitting a new issue.
Please select affected platform(s)
Steps to reproduce
In a recent version of
flutter-geocoding
, instead of passing the locale identifier as part of the request (e.g.placemarkFromCoordinates(lat, long, localeIdentifier)
, now the user has to first callsetLocaleIdentifier(localeIdentifier)
, and then callplacemarkFromCoordinates(lat, long)
.This is problematic if (like in my app) the locale identifier is switching frequently, and there may be more than one reverse geocoding call at a given time (basically I need to be able to reverse geocode into several locales at the same time). There is a race condition, whereby two different threads could interfere with each other's geocoding call.
I know this is an unusual usecase, but the chance for race condition is real, and this is not a good API change.
Expected results
Locale should always be passed in the call (as it is in the currently-released version).
Actual results
Locale is passed in a separate initial step, in the git latest version.
Code sample
N/A
Screenshots or video
N/A
Version
N/A
Flutter Doctor output
N/A
The text was updated successfully, but these errors were encountered: