Chore: destroy worker thread

This commit is contained in:
SukkaW
2022-09-23 00:07:38 +08:00
parent 8a7f32e2cd
commit 7cec542320
4 changed files with 37 additions and 29 deletions

View File

@@ -55,6 +55,8 @@ async function processDomainLists (domainListsUrl) {
* @param {string | URL} hostsUrl
*/
async function processHosts (hostsUrl, includeAllSubDomain = false) {
console.time(` - processHosts: ${hostsUrl}`);
if (typeof hostsUrl === 'string') {
hostsUrl = new URL(hostsUrl);
}
@@ -87,6 +89,8 @@ async function processHosts (hostsUrl, includeAllSubDomain = false) {
}
});
console.timeEnd(` - processHosts: ${hostsUrl}`);
return [...domainSets];
}
@@ -98,10 +102,6 @@ async function processHosts (hostsUrl, includeAllSubDomain = false) {
async function processFilterRules (filterRulesUrl, fallbackUrls) {
console.time(` - processFilterRules: ${filterRulesUrl}`);
if (typeof filterRulesUrl === 'string') {
filterRulesUrl = new URL(filterRulesUrl);
}
/** @type Set<string> */
const whitelistDomainSets = new Set();
/** @type Set<string> */