amplitude / Amplitude-Kotlin

Amplitude Kotlin SDK
MIT License
27 stars 10 forks source link

fix: remove a data race when auto-generated device id is used instead of custom device id #156

Closed falconandy closed 5 months ago

falconandy commented 8 months ago

Summary

  1. Adds a new configuration option deviceId to prevent device id auto-generation.
  2. Adds a new internal setDeviceId() method that sets device id if current and expected device ids are equal.
  3. Switches amplitudeDispatcher to single thread mode
  4. Adds tests that reproduce the fixed data race.

Checklist

justin-fiedler commented 5 months ago

Resolved in #177