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
12345678910#!/usr/bin/env nodeimport {sendMessage, getOneMessage} from '../../index.js';
// The pattern recommended to avoid a deadlock, when the other process is not listeningconst [message] = await Promise.all([ getOneMessage(), sendMessage('.', {strict: true}),]);await sendMessage(message);