-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pthreads support for Node.js #9745
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
866676b
horrible wip [ci skip]
kripken 5e80c1f
bad wip exploration [ci skip]
kripken 6c427c7
note the issue [ci skip]
kripken 3604163
wip [ci skip]
kripken 14eb654
Merge remote-tracking branch 'origin/incoming' into node-pthreads
kripken a90fc1b
wip [ci skip]
kripken 3f07026
Merge remote-tracking branch 'origin/incoming' into node-pthreads
kripken 7a3716d
more logging [ci skip]
kripken 257b02b
more [ci skip]
kripken 5a7731d
Merge [ci skip]
kripken 0694d4f
Merge remote-tracking branch 'origin/incoming' into node-pthreads
kripken 5a8c86d
exit pthread properly on node [ci skip]
kripken 4120e71
frist test
kripken 1d85ac0
TODO [ci skip]
kripken b6003c2
testing
kripken 9619833
cleanups
kripken fb605f0
more cleanup
kripken 1e2e871
revert
kripken fed61a3
fix closure
kripken 399e9ca
fix
kripken b5245d0
fix
kripken 43c180a
cleanup
kripken cc9c1de
Merge remote-tracking branch 'origin/incoming' into node-pthreads
kripken da9d89e
feedback
kripken ec991f8
Nicer warning
kripken b6cbb22
More event handling
kripken 1073fa5
feedback
kripken 8354dff
flake8
kripken fe6edc9
text
kripken 4858324
use perf_hooks.performance, and use it for all threads
kripken 7bf730f
Merge remote-tracking branch 'origin/incoming' into node-pthreads
kripken 5c1c6d7
Merge remote-tracking branch 'origin/incoming' into node-pthreads
kripken File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,25 @@ | ||
read_ = function shell_read(filename, binary) { | ||
var ret; | ||
#if SUPPORT_BASE64_EMBEDDING | ||
ret = tryParseAsDataURI(filename); | ||
if (!ret) { | ||
#endif | ||
if (!nodeFS) nodeFS = require('fs'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. src/node_shell_read.js |
||
if (!nodePath) nodePath = require('path'); | ||
filename = nodePath['normalize'](filename); | ||
ret = nodeFS['readFileSync'](filename); | ||
#if SUPPORT_BASE64_EMBEDDING | ||
} | ||
#endif | ||
return binary ? ret : ret.toString(); | ||
}; | ||
|
||
readBinary = function readBinary(filename) { | ||
var ret = read_(filename, true); | ||
if (!ret.buffer) { | ||
ret = new Uint8Array(ret); | ||
} | ||
assert(ret.buffer); | ||
return ret; | ||
}; | ||
|
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,63 @@ | ||
read_ = function shell_read(url) { | ||
#if SUPPORT_BASE64_EMBEDDING | ||
try { | ||
#endif | ||
var xhr = new XMLHttpRequest(); | ||
xhr.open('GET', url, false); | ||
xhr.send(null); | ||
return xhr.responseText; | ||
#if SUPPORT_BASE64_EMBEDDING | ||
} catch (err) { | ||
var data = tryParseAsDataURI(url); | ||
if (data) { | ||
return intArrayToString(data); | ||
} | ||
throw err; | ||
} | ||
#endif | ||
}; | ||
|
||
if (ENVIRONMENT_IS_WORKER) { | ||
readBinary = function readBinary(url) { | ||
#if SUPPORT_BASE64_EMBEDDING | ||
try { | ||
#endif | ||
var xhr = new XMLHttpRequest(); | ||
xhr.open('GET', url, false); | ||
xhr.responseType = 'arraybuffer'; | ||
xhr.send(null); | ||
return new Uint8Array(xhr.response); | ||
#if SUPPORT_BASE64_EMBEDDING | ||
} catch (err) { | ||
var data = tryParseAsDataURI(url); | ||
if (data) { | ||
return data; | ||
} | ||
throw err; | ||
} | ||
#endif | ||
}; | ||
} | ||
|
||
readAsync = function readAsync(url, onload, onerror) { | ||
var xhr = new XMLHttpRequest(); | ||
xhr.open('GET', url, true); | ||
xhr.responseType = 'arraybuffer'; | ||
xhr.onload = function xhr_onload() { | ||
if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 | ||
onload(xhr.response); | ||
return; | ||
} | ||
#if SUPPORT_BASE64_EMBEDDING | ||
var data = tryParseAsDataURI(url); | ||
if (data) { | ||
onload(data.buffer); | ||
return; | ||
} | ||
#endif | ||
onerror(); | ||
}; | ||
xhr.onerror = onerror; | ||
xhr.send(null); | ||
}; | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Storage Allocation Method. Hardware is needed.. static Ram. And bios need to be on an external harddrive. .3 disk and 5 readers . With the modifications of each disc except for the center disc need to rotate at a syncrinive rpm in opposite directions this the nodes and threads will be will be twin cousins to the interface OS.. thus the external hardware will see them as one until data is deleted... The electron nodes only take in and recognize hardware attributed firmware ,threads don't recognize any thing except nodes. Environment is semi magnetic before and virtual after... Thus nodes and threads need to be external of an O.S,. [∆π¥] ..Z +Z²=©°![Uploading b5{3c0afaa} (ae8ba507-5d6d-488c-88eb-8b4ffa783c47 id=0x7f0a0v.www.darpa.mil