This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add isolate version of test-child-process-fork
- Loading branch information
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Skip this test if Node is not compiled with isolates support. | ||
if (!process.features.isolates) return; | ||
|
||
var assert = require('assert'); | ||
|
||
// This is the same test as test-child-process-fork except it uses isolates | ||
// instead of processes. process.TEST_ISOLATE is a ghetto method of passing | ||
// some information into the other test. | ||
process.TEST_ISOLATE = true; | ||
require('./test-child-process-fork'); | ||
|
||
var numThreads = process.binding('isolates').count(); | ||
assert.ok(numThreads > 1); |