Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

227
Vistas
How to multithread a recursive function javascript

Hey i was wondering how i would go about dynamically call a function like the following:

async function xxx(number) { 
  if(number == 10) return
  xxx(number + 1);
}

My goal is instead of having it call 1 at a time i want it to call 3/4 and run side by side(if 1 thread has checked number 2 others wont check), the number of threads depending on the needed outcome. This is a basic version but good example of what i need done

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can use Web worker here to perform a task from another thread. Web worker gives that ability to run a task in background without affecting the main thread, Please check this link for more info using web worker

I will also recommend you to check the difference between Service worker and Web worker so that you can analyse what suits the best for the use case, please check this link

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda