Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

341
Visualizações
Is Web API:S Fetch() parallell or async?

I'm having trouble finding the answer to this. When we call fetch(), is the browser opening a new thread or is the call just put in the microqueue?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The answer is sort of "both":

  • The network request itself is processed in parallel with anything else happening on your JavaScript thread, not on the JavaScript thread. (In all major browsers.)

  • When the network request is complete, a promise reaction (fulfillment or rejection) is queued to be picked up by the JavaScript thread when it's next checking the relevant queue. (I think what happens is that the browser queues a task that settles the promise, which in turn queues any relevant promise reactions in the microtask queue. The details don't really matter, though; fundamentally, once the network request is complete, a task/microtask is queued somewhere for any promise reactions that need to happen, and picked up by the JavaScript thread like other tasks/microtasks.)

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda