Lines Matching +full:require +full:- +full:common +full:- +full:first
3 const common = require('../common'); constant
4 const assert = require('assert');
7 } = require('worker_threads');
13 c2.onmessage = common.mustCall((e) => {
30 // first, then c2, then c3. In the Node.js dispatching
39 // Whereas in the browser-ordering (as illustrated in the
53 const handler = common.mustCall((e) => {
61 if (!common.isWindows) {
90 c2.onmessage = common.mustNotCall();
92 c3.onmessage = common.mustCall(() => c3.close());
102 c2.onmessage = common.mustNotCall();
103 c3.onmessage = common.mustCall(() => c3.close());
110 const c1 = new BroadcastChannel('create-in-onmessage').unref();
111 const c2 = new BroadcastChannel('create-in-onmessage');
113 c2.onmessage = common.mustCall((e) => {
114 assert.strictEqual(e.data, 'first');
116 const c3 = new BroadcastChannel('create-in-onmessage');
117 c3.onmessage = common.mustCall((event) => {
123 c1.postMessage('first');
129 if (!common.isWindows) {
132 const c1 = new BroadcastChannel('close-in-onmessage2').unref();
133 const c2 = new BroadcastChannel('close-in-onmessage2');
134 const c3 = new BroadcastChannel('close-in-onmessage2');
140 // c2 closes itself when it receives the first message
141 c2.addEventListener('message', common.mustCall(() => c2.close()));
143 c3.addEventListener('message', common.mustCall((e) => {
146 'c2: first',
147 'c3: first',
152 c1.postMessage('first');