First pass at an atom.signal
API (inter-window communcation)
#826
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #822.
Description of the Change
Implements a simplified API for one window to send a signal to all windows, optionally including itself. (#822 explores scenarios where this could be needed.) We use the main process to act as a broker.
Alternate Designs
I started out envisioning that this would combine reactivity and storage, much like
atom.config
. But we can already uselocalStorage
for the storage side, and I didn’t feel like reimplementing the whole thing when what’s most urgently needed is the signaling.Possible Drawbacks
I can’t really think of any. This is a pretty thin layer over Electron’s built-in tools for communicating between the main process and the individual renderer processes.
Verification Process
None yet! This PR is in draft mode while I figure out exactly how I’m gonna test this thing.
Release Notes
atom.signal
, an API for sending messages between different Pulsar windows.