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

178
Vistas
Is the task of Web API in browser same as the task of thread pool in Node.Js?

For Javascript in Browser and node.js, I am trying to understand the difference between the thread pool and Web API. Both the thread pool, and Web API, enable Javascript to handle asynchronous behavior, so how they are different? Web API after completion of the task sends the task to the Queues from where the task is sent back to the call stack. How do Thread Pool and NodeJS work to imitate asynchronous behavior?

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

They are completely unrelated.


The main event loop is where most JavaScript code you write runs.

Expensive operations (such as file access or code you explicitly run in a worker) are often done outside of the main event loop. This frees up the main event loop to do other work.

We say something is asynchronous when it is performed outside the main event loop because it isn't done in sequence with the rest of the work the main event loop is doing.

The thread pool is just how Node.js' particular implementation manages those asynchronous tasks.


The Web APIs are a set of classes/functions/etc provided to JavaScript programs that run in browsers which have functionality that is often desired in JS programs that are embedded in webpages but which are not part of the JavaScript language.

e.g. the Object constructor is a core part of JavaScript, while the HTML DOM API is a Web API.

Some of those features (such as XMLHttpRequest) do work outside the main event loop, but that isn't an intrinsic feature of Web APIs (e.g. the DOM API doesn't).

Node.js puts equivalent functionality in built-in modules (such as the fs module).

about 4 years ago · Santiago Gelvez 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