Skip to content

Commit 9053f90

Browse files
committed
#8173 app worker uid
1 parent a598a76 commit 9053f90

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/core/Base.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ class Base {
259259
}
260260
});
261261

262-
me.id = config.id || IdGenerator.getId(this.getIdKey());
262+
me.id = config.id || me.constructor.config.id || IdGenerator.getId(this.getIdKey());
263263
delete config.id;
264264

265265
// Assign class field values prior to configs

src/worker/App.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ class App extends Base {
2424
* @reactive
2525
*/
2626
countLoadingThemeFiles_: 0,
27+
/**
28+
* Using crypto.randomUUID() as a unique window identifier.
29+
* This is especially important for the neural link, where multiple App workers can connect.
30+
* @member {String} id=crypto.randomUUID()
31+
* @protected
32+
*/
33+
id: crypto.randomUUID(),
2734
/**
2835
* Remote method access for other workers
2936
* @member {Object} remote

0 commit comments

Comments
 (0)