react-native-worklets 0.9.0 → 0.10.0-nightly-20260526-c5086a846
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.
- package/Common/cpp/worklets/NativeModules/JSIWorkletsModuleProxy.cpp +6 -8
- package/Common/cpp/worklets/WorkletRuntime/RuntimeManager.cpp +0 -8
- package/Common/cpp/worklets/WorkletRuntime/RuntimeManager.h +7 -5
- package/compatibility.json +3 -0
- package/lib/module/debug/jsVersion.js +1 -1
- package/lib/module/debug/jsVersion.js.map +1 -1
- package/lib/typescript/debug/jsVersion.d.ts +1 -1
- package/lib/typescript/debug/jsVersion.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/debug/jsVersion.ts +1 -1
|
@@ -212,14 +212,12 @@ inline void registerCustomSerializable(
|
|
|
212
212
|
const int typeId) {
|
|
213
213
|
const SerializationData data{.determine = determine, .pack = pack, .unpack = unpack, .typeId = typeId};
|
|
214
214
|
// Prevent registering new worklet runtimes while we are updating existing ones to prevent inconsistencies.
|
|
215
|
-
runtimeManager->
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
runtimeManager->resume();
|
|
215
|
+
runtimeManager->withRegistrationPaused([&] {
|
|
216
|
+
memoryManager->registerCustomSerializable(data);
|
|
217
|
+
for (const auto &runtime : runtimeManager->getAllRuntimes()) {
|
|
218
|
+
memoryManager->loadCustomSerializable(runtime, data);
|
|
219
|
+
}
|
|
220
|
+
});
|
|
223
221
|
}
|
|
224
222
|
|
|
225
223
|
} // namespace
|
|
@@ -83,12 +83,4 @@ void RuntimeManager::registerRuntime(const uint64_t runtimeId, const std::shared
|
|
|
83
83
|
weakRuntimes_[runtimeId] = workletRuntime;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
void RuntimeManager::pause() {
|
|
87
|
-
registrationMutex_.lock();
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
void RuntimeManager::resume() {
|
|
91
|
-
registrationMutex_.unlock();
|
|
92
|
-
}
|
|
93
|
-
|
|
94
86
|
} // namespace worklets
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
#include <cstdint>
|
|
10
10
|
#include <map>
|
|
11
11
|
#include <memory>
|
|
12
|
+
#include <mutex>
|
|
12
13
|
#include <shared_mutex>
|
|
13
14
|
#include <string>
|
|
15
|
+
#include <utility>
|
|
14
16
|
#include <vector>
|
|
15
17
|
|
|
16
18
|
namespace worklets {
|
|
@@ -37,11 +39,11 @@ class RuntimeManager {
|
|
|
37
39
|
|
|
38
40
|
std::shared_ptr<WorkletRuntime> createUninitializedUIRuntime(const std::shared_ptr<AsyncQueue> &uiAsyncQueue);
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
template <class Fn>
|
|
43
|
+
decltype(auto) withRegistrationPaused(Fn &&fn) {
|
|
44
|
+
std::unique_lock lock(registrationMutex_);
|
|
45
|
+
return std::forward<Fn>(fn)();
|
|
46
|
+
}
|
|
45
47
|
|
|
46
48
|
private:
|
|
47
49
|
uint64_t getNextRuntimeId();
|
package/compatibility.json
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* version used to build the native part of the library in runtime. Remember to
|
|
6
6
|
* keep this in sync with the version declared in `package.json`
|
|
7
7
|
*/
|
|
8
|
-
export const jsVersion = '0.
|
|
8
|
+
export const jsVersion = '0.10.0-nightly-20260526-c5086a846';
|
|
9
9
|
//# sourceMappingURL=jsVersion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["jsVersion"],"sourceRoot":"../../../src","sources":["debug/jsVersion.ts"],"mappings":"AAAA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,SAAS,GAAG,
|
|
1
|
+
{"version":3,"names":["jsVersion"],"sourceRoot":"../../../src","sources":["debug/jsVersion.ts"],"mappings":"AAAA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,SAAS,GAAG,mCAAmC","ignoreList":[]}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* version used to build the native part of the library in runtime. Remember to
|
|
4
4
|
* keep this in sync with the version declared in `package.json`
|
|
5
5
|
*/
|
|
6
|
-
export declare const jsVersion = "0.
|
|
6
|
+
export declare const jsVersion = "0.10.0-nightly-20260526-c5086a846";
|
|
7
7
|
//# sourceMappingURL=jsVersion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsVersion.d.ts","sourceRoot":"","sources":["../../../src/debug/jsVersion.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"jsVersion.d.ts","sourceRoot":"","sources":["../../../src/debug/jsVersion.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,SAAS,sCAAsC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-worklets",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0-nightly-20260526-c5086a846",
|
|
4
4
|
"description": "The React Native multithreading library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@babel/core": "*",
|
|
60
60
|
"@react-native/metro-config": "*",
|
|
61
61
|
"react": "*",
|
|
62
|
-
"react-native": "0.
|
|
62
|
+
"react-native": "0.83 - 0.86"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@babel/plugin-transform-arrow-functions": "^7.27.1",
|
package/src/debug/jsVersion.ts
CHANGED