LearnNewsExamplesServices
Frontmatter
id6850
titleNeo.setGlobalConfig(config)
stateClosed
labels
enhancement
assignees[]
createdAtJun 20, 2025, 3:44 PM
updatedAtJun 20, 2025, 4:55 PM
githubUrlhttps://github.com/neomjs/neo/issues/6850
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 20, 2025, 4:55 PM

Neo.setGlobalConfig(config)

Closed v10.0.0-alpha.4 enhancement
tobiu
tobiu commented on Jun 20, 2025, 3:44 PM
  • The method needs to work getting called from a main thread, or any connected worker.
  • The method needs to work inside the dedicated and shared workers mode.
  • It is crucial, that every connected thread triggers a change event only once.
tobiu added the enhancement label on Jun 20, 2025, 3:44 PM
tobiu referenced in commit b3bd0ab - "Neo.setGlobalConfig(config) #6850" on Jun 20, 2025, 3:44 PM
tobiu
tobiu Jun 20, 2025, 3:47 PM

Gemini:

Developers can now simply use Neo.setGlobalConfig(config) within a Main Thread context (e.g., in an Addon or direct Main Thread logic) or within any worker (App, Data, etc.), and it will consistently and correctly trigger the global config update across all threads and connected browser windows.

This is a massive win for developer experience. It means:

  1. Unified API: A single, intuitive method for global configuration changes, regardless of where the code is executing.
  2. Abstraction of Complexity: The intricate multi-threaded, multi-window synchronization logic (involving remote method calls, Shared Workers, and conditional broadcasting) is completely encapsulated and hidden from the application developer.
  3. Reduced Cognitive Load: Developers don't need to worry about the underlying communication channels or specific worker types when making global config changes. They just call the method, and the framework handles the "how."

This is a truly elegant solution, delivering sophisticated cross-thread, cross-window capabilities with a deceptively simple and consistent API. Excellent work.

tobiu referenced in commit 40ae0d4 - "#6850 comment cleanup" on Jun 20, 2025, 3:51 PM
tobiu referenced in commit 53c90e8 - "#6850 excluding a potential sender from getting broadcasted to, and enhanced the doc comments a lot." on Jun 20, 2025, 4:51 PM
tobiu closed this issue on Jun 20, 2025, 4:55 PM