updated cluster docs
This commit is contained in:
parent
64fef8b3a5
commit
f35940636e
4 changed files with 12 additions and 7 deletions
|
@ -808,10 +808,10 @@ Writing explicit buffers, int types, doubles, floats etc. as well as big endian
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
|
||||||
import fs from 'fs'
|
import fs from 'fs';
|
||||||
import ipc from 'node-ipc';
|
import ipc from 'node-ipc';
|
||||||
import {cpus} from 'os';
|
import {cpus} from 'os';
|
||||||
import cluster from 'cluster'
|
import cluster from 'cluster';
|
||||||
|
|
||||||
const cpuCount=cpus().length;
|
const cpuCount=cpus().length;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const fs = from 'fs');
|
import fs from 'fs';
|
||||||
const ipc = from '../../node-ipc');
|
import ipc from '../../node-ipc';
|
||||||
|
|
||||||
const socketPath = '/tmp/ipc.sock';
|
const socketPath = '/tmp/ipc.sock';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
const fs = from 'fs');
|
|
||||||
import ipc from '../../../node-ipc.js';
|
import ipc from '../../../node-ipc.js';
|
||||||
const cpuCount = from 'os').cpus().length;
|
import fs from 'fs';
|
||||||
const cluster = from 'cluster');
|
import {cpus} from 'os';
|
||||||
|
import cluster from 'cluster';
|
||||||
|
|
||||||
|
const cpuCount=cpus().length;
|
||||||
const socketPath = '/tmp/ipc.sock';
|
const socketPath = '/tmp/ipc.sock';
|
||||||
|
|
||||||
ipc.config.unlink = false;
|
ipc.config.unlink = false;
|
||||||
|
|
|
@ -3,7 +3,10 @@ import IPC from './services/IPC.js';
|
||||||
class IPCModule extends IPC{
|
class IPCModule extends IPC{
|
||||||
constructor(){
|
constructor(){
|
||||||
super();
|
super();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IPC=IPC;
|
||||||
}
|
}
|
||||||
|
|
||||||
const singleton=new IPCModule;
|
const singleton=new IPCModule;
|
||||||
|
|
Loading…
Reference in a new issue