ipc-echo-strict-deadlock.js
This file
Path
test/fixtures/ipc-echo-strict-deadlock.js
9 lines · 291 bytes · JavaScript
Last changed by
Fix the `strict` and `ipcInput` options with the `serialization` optionSindre Sorhusbefore adoption9842f1a
History of this fileTake it
Fix the `strict` and `ipcInput` options with the `serialization` optionSindre Sorhusbefore adoption9842f1a
lines 1–9why, one step back1#!/usr/bin/env node2import {sendMessage, getOneMessage} from '../../index.js';34// The pattern recommended to avoid a deadlock, when the other process is not listening5const [message] = await Promise.all([6 getOneMessage(),7 sendMessage('.', {strict: true}),8]);9await sendMessage(message);