react-native-reanimated 4.2.2 → 4.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,6 +38,18 @@ void UpdatesRegistry::flushUpdates(UpdatesBatch &updatesBatch) {
38
38
  }
39
39
  }
40
40
 
41
+ UpdatesBatch UpdatesRegistry::getPendingUpdates() {
42
+ auto lock = std::lock_guard<std::mutex>{mutex_};
43
+ flushUpdatesToRegistry(updatesBatch_);
44
+
45
+ UpdatesBatch updatesBatch;
46
+ for (const auto &[tag, pair] : updatesRegistry_) {
47
+ const auto &[shadowNode, props] = pair;
48
+ updatesBatch.emplace_back(shadowNode, props);
49
+ }
50
+ return updatesBatch;
51
+ }
52
+
41
53
  void UpdatesRegistry::collectProps(PropsMap &propsMap) {
42
54
  std::lock_guard<std::mutex> lock{mutex_};
43
55
 
@@ -46,6 +46,7 @@ class UpdatesRegistry {
46
46
 
47
47
  void flushUpdates(UpdatesBatch &updatesBatch);
48
48
  void collectProps(PropsMap &propsMap);
49
+ UpdatesBatch getPendingUpdates();
49
50
 
50
51
  protected:
51
52
  mutable std::mutex mutex_;