Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

222
Views
Javascript: agregue la función a la lista sin activarla

Estoy tratando de aprender programación asíncrona, por lo que he estado usando ejemplos con Python y tratando de aplicar lo mismo para JavaScript, sin embargo, en Python puede crear una lista que contenga corrutinas (funciones asíncronas) anidadas dentro de una lista para usar asyncio.gather() en. ¿Cómo se hace esto en JavaScript? Resto del código aquí para agregar contexto (en python):

 # Here we create a list that tracks all the async tasks to-do. tasks = [] for i in range(10): # Here we add the task of main() function 10 times and add it to the tasks list. Notice that the main is # wrapped in [] tasks += [main(i)] # Finally, asyncio gathers the result of all the tasks in the task list. Notice the * asterisk await asyncio.gather(*tasks)
 async function async_io() { let tasks = [] for (let i = 0; i < 10; i++) { tasks.push([main(i)]); } console.log(tasks) }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!