Skip to content

Instantly share code, notes, and snippets.

@eligrey
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eligrey/9a48b71b2f5da67b834b to your computer and use it in GitHub Desktop.
Save eligrey/9a48b71b2f5da67b834b to your computer and use it in GitHub Desktop.
Explaining to Ehsan Akhgari that modern OS schedulers can handle multitasking under 100% load
var cores = prompt("Enter your total logical processors");
var code = new Blob(["while(1)"], {type: "application/javascript"});
var url = URL.createObjectURL(code);
while (cores--) {
new Worker(url);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment