Closed
Description
Describe the bug
When running our app with the Xcode Thread Sanitizer enabled, we sometimes see this runtime warning: Swift access race in Segment.CountBasedFlushPolicy.count.modify : Swift.Int at 0x11a75f4c0
It's flagged within the CountBasedFlushPolicy
class at this line of code:
public func updateState(event: RawEvent) {
count += 1 <-----
}
To Reproduce
- Edit the current main app target (iOS) scheme
- For the Run (Debug) section, select Diagnostics, enable "Thread Sanitizer" check box
- Run app
Expected behavior
No runtime warnings
Platform (please complete the following information):
- Library Version in use: 1.4.5 (But I don't think this issue is new to this version)
- Platform being tested: iOS 16.4 on simulator
- Integrations in use: None except custom proxy