A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/nodejs/node/commit/b7315281be below:

move numCPUs require to top of file in cluster CJS example · nodejs/node@b731528 · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+1

-1

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+1

-1

lines changed Original file line number Diff line number Diff line change

@@ -317,6 +317,7 @@ if (cluster.isPrimary) {

317 317

```cjs

318 318

const cluster = require('node:cluster');

319 319

const http = require('node:http');

320 +

const numCPUs = require('node:os').availableParallelism();

320 321

const process = require('node:process');

321 322 322 323

if (cluster.isPrimary) {

@@ -335,7 +336,6 @@ if (cluster.isPrimary) {

335 336

}

336 337 337 338

// Start workers and listen for messages containing notifyRequest

338 -

const numCPUs = require('node:os').availableParallelism();

339 339

for (let i = 0; i < numCPUs; i++) {

340 340

cluster.fork();

341 341

}

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4