Removed the max parallel request limit

canary
WolverinDEV 2020-08-05 18:33:33 +02:00
parent be6d0104b6
commit 5fbef85470
2 changed files with 2 additions and 3 deletions

View File

@ -49,9 +49,9 @@ export async function load_parallel<T>(requests: T[], executor: (_: T) => Promis
if(typeof callback === "undefined") if(typeof callback === "undefined")
callback = () => {}; callback = () => {};
options.max_parallel_requests = 1; const maxParallelRequests = typeof options.max_parallel_requests === "number" && options.max_parallel_requests > 0 ? options.max_parallel_requests : Number.MAX_SAFE_INTEGER;
while (pendingRequests.length > 0) { while (pendingRequests.length > 0) {
while(typeof options.max_parallel_requests !== "number" || options.max_parallel_requests <= 0 || Object.keys(currentRequests).length < options.max_parallel_requests) { while(Object.keys(currentRequests).length < maxParallelRequests) {
const element = pendingRequests.pop(); const element = pendingRequests.pop();
const name = stringify(element); const name = stringify(element);

View File

@ -23,7 +23,6 @@ export default class implements ApplicationLoader {
}); });
/* required sadly */ /* required sadly */
loader.register_task(loader.Stage.SETUP, { loader.register_task(loader.Stage.SETUP, {
name: "page setup", name: "page setup",
function: async () => { function: async () => {