Frontmatter
| id | 6850 |
| title | Neo.setGlobalConfig(config) |
| state | Closed |
| labels | enhancement |
| assignees | [] |
| createdAt | Jun 20, 2025, 3:44 PM |
| updatedAt | Jun 20, 2025, 4:55 PM |
| githubUrl | https://github.com/neomjs/neo/issues/6850 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jun 20, 2025, 4:55 PM |
Neo.setGlobalConfig(config)

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
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:
- Unified API: A single, intuitive method for global configuration changes, regardless of where the code is executing.
- 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.
- 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 closed this issue on Jun 20, 2025, 4:55 PM