prolong worker lifetime to 5 minutes (#993)

This commit is contained in:
tophf 2020-07-14 23:24:00 +03:00 committed by GitHub
parent ca3633b896
commit 09f6e8d44a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@ const workerUtil = (() => {
const loadedScripts = new Set(); const loadedScripts = new Set();
return {createWorker, createAPI, loadScript, cloneError}; return {createWorker, createAPI, loadScript, cloneError};
function createWorker({url, lifeTime = 30}) { function createWorker({url, lifeTime = 300}) {
let worker; let worker;
let id; let id;
let timer; let timer;