Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add strict option to sendMessage() #1098

Merged
merged 5 commits into from
May 26, 2024
Merged

Add strict option to sendMessage() #1098

merged 5 commits into from
May 26, 2024

Conversation

ehmicky
Copy link
Collaborator

@ehmicky ehmicky commented May 25, 2024

This PR adds a strict option to sendMessage().

When set to true, sendMessage() throws if the other process is not currently listening/receiving messages.

This is a measure that helps users identifying some timing-related race condition bugs, where they intend to listen to a message, but do it too late.

@ehmicky ehmicky force-pushed the ipc-strict branch 2 times, most recently from fdac3e1 to 4af7dc9 Compare May 25, 2024 20:53
docs/api.md Outdated Show resolved Hide resolved
docs/ipc.md Outdated Show resolved Hide resolved
ehmicky and others added 3 commits May 26, 2024 17:51
Co-authored-by: Sindre Sorhus <[email protected]>
Co-authored-by: Sindre Sorhus <[email protected]>
@ehmicky ehmicky requested a review from sindresorhus May 26, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants