reduce max concurrency to 2 because firefox is such a complete pile of dogshit that cant cope with multithreaded javascript

This commit is contained in:
Thomas Lynch
2022-09-02 14:31:40 +00:00
parent cc826accf3
commit d2c9e1a15f

View File

@ -13,7 +13,7 @@ if (window.Worker && crypto.subtle) {
const challenge = document.querySelector('[data-pow]').dataset.pow;
const difficulty = 0;
const start = Date.now();
const threads = Math.min(4,Math.ceil(window.navigator.hardwareConcurrency/2));
const threads = Math.min(2,Math.ceil(window.navigator.hardwareConcurrency/2));
let finished = false;
const messageHandler = (e) => {
if (finished) { return; }