@@ -111,7 +111,7 @@ responsibility to manage the worker pool based on its own needs.
111111Although a primary use case for the ` cluster ` module is networking, it can
112112also be used for other use cases requiring worker processes.
113113
114- ## Class: Worker
114+ ## Class: ` Worker `
115115<!-- YAML
116116added: v0.7.0
117117-->
@@ -122,7 +122,7 @@ A `Worker` object contains all public information and method about a worker.
122122In the master it can be obtained using ` cluster.workers ` . In a worker
123123it can be obtained using ` cluster.worker ` .
124124
125- ### Event: 'disconnect'
125+ ### Event: ` 'disconnect' `
126126<!-- YAML
127127added: v0.7.7
128128-->
@@ -135,7 +135,7 @@ cluster.fork().on('disconnect', () => {
135135});
136136```
137137
138- ### Event: 'error'
138+ ### Event: ` 'error' `
139139<!-- YAML
140140added: v0.7.3
141141-->
@@ -144,7 +144,7 @@ This event is the same as the one provided by [`child_process.fork()`][].
144144
145145Within a worker, ` process.on('error') ` may also be used.
146146
147- ### Event: 'exit'
147+ ### Event: ` 'exit' `
148148<!-- YAML
149149added: v0.11.2
150150-->
@@ -168,7 +168,7 @@ worker.on('exit', (code, signal) => {
168168});
169169```
170170
171- ### Event: 'listening'
171+ ### Event: ` 'listening' `
172172<!-- YAML
173173added: v0.7.0
174174-->
@@ -185,7 +185,7 @@ cluster.fork().on('listening', (address) => {
185185
186186It is not emitted in the worker.
187187
188- ### Event: 'message'
188+ ### Event: ` 'message' `
189189<!-- YAML
190190added: v0.7.0
191191-->
@@ -244,7 +244,7 @@ if (cluster.isMaster) {
244244}
245245```
246246
247- ### Event: 'online'
247+ ### Event: ` 'online' `
248248<!-- YAML
249249added: v0.7.0
250250-->
@@ -259,7 +259,7 @@ cluster.fork().on('online', () => {
259259
260260It is not emitted in the worker.
261261
262- ### worker.disconnect()
262+ ### ` worker.disconnect() `
263263<!-- YAML
264264added: v0.7.7
265265changes:
@@ -329,7 +329,7 @@ if (cluster.isMaster) {
329329}
330330```
331331
332- ### worker.exitedAfterDisconnect
332+ ### ` worker.exitedAfterDisconnect `
333333<!-- YAML
334334added: v6.0.0
335335-->
@@ -355,7 +355,7 @@ cluster.on('exit', (worker, code, signal) => {
355355worker .kill ();
356356```
357357
358- ### worker.id
358+ ### ` worker.id `
359359<!-- YAML
360360added: v0.8.0
361361-->
@@ -368,7 +368,7 @@ Each new worker is given its own unique id, this id is stored in the
368368While a worker is alive, this is the key that indexes it in
369369` cluster.workers ` .
370370
371- ### worker.isConnected()
371+ ### ` worker.isConnected() `
372372<!-- YAML
373373added: v0.11.14
374374-->
@@ -377,7 +377,7 @@ This function returns `true` if the worker is connected to its master via its
377377IPC channel, ` false ` otherwise. A worker is connected to its master after it
378378has been created. It is disconnected after the ` 'disconnect' ` event is emitted.
379379
380- ### worker.isDead()
380+ ### ` worker.isDead() `
381381<!-- YAML
382382added: v0.11.14
383383-->
@@ -415,7 +415,7 @@ if (cluster.isMaster) {
415415}
416416```
417417
418- ### worker.kill(\ [ signal='SIGTERM'\] )
418+ ### ` worker.kill([signal='SIGTERM']) `
419419<!-- YAML
420420added: v0.9.12
421421-->
@@ -439,7 +439,7 @@ This method is aliased as `worker.destroy()` for backwards compatibility.
439439In a worker, ` process.kill() ` exists, but it is not this function;
440440it is [ ` kill() ` ] [ ] .
441441
442- ### worker.process
442+ ### ` worker.process `
443443<!-- YAML
444444added: v0.7.0
445445-->
@@ -456,7 +456,7 @@ Workers will call `process.exit(0)` if the `'disconnect'` event occurs
456456on ` process ` and ` .exitedAfterDisconnect ` is not ` true ` . This protects against
457457accidental disconnection.
458458
459- ### worker.send(message\ [ , sendHandle\ [ , options\]\]\ [ , callback\] )
459+ ### ` worker.send(message[, sendHandle[, options]] [, callback]) `
460460<!-- YAML
461461added: v0.7.0
462462changes:
@@ -498,7 +498,7 @@ if (cluster.isMaster) {
498498}
499499```
500500
501- ## Event: 'disconnect'
501+ ## Event: ` 'disconnect' `
502502<!-- YAML
503503added: v0.7.9
504504-->
@@ -519,7 +519,7 @@ cluster.on('disconnect', (worker) => {
519519});
520520```
521521
522- ## Event: 'exit'
522+ ## Event: ` 'exit' `
523523<!-- YAML
524524added: v0.7.9
525525-->
@@ -543,7 +543,7 @@ cluster.on('exit', (worker, code, signal) => {
543543
544544See [ ` child_process ` event: ` 'exit' ` ] [ ] .
545545
546- ## Event: 'fork'
546+ ## Event: ` 'fork' `
547547<!-- YAML
548548added: v0.7.0
549549-->
@@ -571,7 +571,7 @@ cluster.on('exit', (worker, code, signal) => {
571571});
572572```
573573
574- ## Event: 'listening'
574+ ## Event: ` 'listening' `
575575<!-- YAML
576576added: v0.7.0
577577-->
@@ -602,7 +602,7 @@ The `addressType` is one of:
602602* ` -1 ` (Unix domain socket)
603603* ` 'udp4' ` or ` 'udp6' ` (UDP v4 or v6)
604604
605- ## Event: 'message'
605+ ## Event: ` 'message' `
606606<!-- YAML
607607added: v2.5.0
608608changes:
@@ -619,7 +619,7 @@ Emitted when the cluster master receives a message from any worker.
619619
620620See [ ` child_process ` event: ` 'message' ` ] [ ] .
621621
622- ## Event: 'online'
622+ ## Event: ` 'online' `
623623<!-- YAML
624624added: v0.7.0
625625-->
@@ -637,7 +637,7 @@ cluster.on('online', (worker) => {
637637});
638638```
639639
640- ## Event: 'setup'
640+ ## Event: ` 'setup' `
641641<!-- YAML
642642added: v0.7.1
643643-->
@@ -652,7 +652,7 @@ The `settings` object is the `cluster.settings` object at the time
652652
653653If accuracy is important, use ` cluster.settings ` .
654654
655- ## cluster.disconnect(\ [ callback\] )
655+ ## ` cluster.disconnect([callback]) `
656656<!-- YAML
657657added: v0.7.7
658658-->
@@ -670,7 +670,7 @@ finished.
670670
671671This can only be called from the master process.
672672
673- ## cluster.fork(\ [ env\] )
673+ ## ` cluster.fork([env]) `
674674<!-- YAML
675675added: v0.6.0
676676-->
@@ -682,7 +682,7 @@ Spawn a new worker process.
682682
683683This can only be called from the master process.
684684
685- ## cluster.isMaster
685+ ## ` cluster.isMaster `
686686<!-- YAML
687687added: v0.8.1
688688-->
@@ -693,7 +693,7 @@ True if the process is a master. This is determined
693693by the ` process.env.NODE_UNIQUE_ID ` . If ` process.env.NODE_UNIQUE_ID ` is
694694undefined, then ` isMaster ` is ` true ` .
695695
696- ## cluster.isWorker
696+ ## ` cluster.isWorker `
697697<!-- YAML
698698added: v0.6.0
699699-->
@@ -702,7 +702,7 @@ added: v0.6.0
702702
703703True if the process is not a master (it is the negation of ` cluster.isMaster ` ).
704704
705- ## cluster.schedulingPolicy
705+ ## ` cluster.schedulingPolicy `
706706<!-- YAML
707707added: v0.11.2
708708-->
@@ -720,7 +720,7 @@ distribute IOCP handles without incurring a large performance hit.
720720` NODE_CLUSTER_SCHED_POLICY ` environment variable. Valid
721721values are ` 'rr' ` and ` 'none' ` .
722722
723- ## cluster.settings
723+ ## ` cluster.settings `
724724<!-- YAML
725725added: v0.7.1
726726changes:
@@ -765,7 +765,7 @@ contain the settings, including the default values.
765765
766766This object is not intended to be changed or set manually.
767767
768- ## cluster.setupMaster(\ [ settings\] )
768+ ## ` cluster.setupMaster([settings]) `
769769<!-- YAML
770770added: v0.7.1
771771changes:
@@ -805,7 +805,7 @@ cluster.fork(); // http worker
805805
806806This can only be called from the master process.
807807
808- ## cluster.worker
808+ ## ` cluster.worker `
809809<!-- YAML
810810added: v0.7.0
811811-->
@@ -826,7 +826,7 @@ if (cluster.isMaster) {
826826}
827827```
828828
829- ## cluster.workers
829+ ## ` cluster.workers `
830830<!-- YAML
831831added: v0.7.0
832832-->
0 commit comments