Last active
April 11, 2021 20:11
-
-
Save GaetanoPiazzolla/472be7aa3e3c0aacf25fc5e82cf84b69 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
app.get('/cpu-intensive/:type/:num/:threads', (req,res) => { | |
console.log('Type: ',req.params.type) | |
console.log('Num:' ,req.params.num) | |
console.log('Threads:' ,req.params.threads) | |
// switch method to run based on TYPE | |
// increasing NUM means increasing CPU-operations | |
// THREADS are the threads to use when using arrays of workers | |
console.log('---') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related to medium article: https://gae-piaz.medium.com/achieve-the-best-performance-10x-faster-node-js-with-worker-threads-97fc2890e40f