Files
react-native/packages
Håkon KnutzenandThibault Malbranche b8006d40b0 Fix data races in RCTImageLoader and RCTNetworkTask with shared atomic counters (#45114)
Summary:
In order to fix the data races described in https://github.com/facebook/react-native/issues/44715, I propose a simple solution by leveraging shared counter functions wherein `std::atomic` is the backing for the integer values.

## Changelog:

[iOS] [Fixed] - Implement shared atomic counters and replace static integers in `RCTImageLoader` and `RCTNetworkTask` that were accessed concurrently, which in some cases lead to data races.

Pull Request resolved: https://github.com/facebook/react-native/pull/45114

Test Plan: Added unit tests for the counters in `RCTSharedCounterTests`.

Reviewed By: cipolleschi

Differential Revision: D59155076

Pulled By: javache

fbshipit-source-id: f73afce6a816ad3226ed8c123cb2ccf4183549a0
2024-07-22 15:43:31 +02:00
..
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00
2024-07-01 17:33:11 +00:00