Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
55 views

I have a long running Python application built on asyncio. It launches several background tasks that run indefinitely and occasionally performs CPU work using asyncio.to_thread. Everything works fine ...
efenatuyo's user avatar
0 votes
1 answer
66 views

I'm trying to deeply understand how the Node.js event loop works, especially when its says it sits idle before poll phase. const fs = require("fs"); setTimeout(() => { console.log(&...
Himanshu Dudhatra's user avatar
2 votes
3 answers
230 views

I have an event loop running in a separate thread from the main thread, and I would like to add a background task to this event loop from the main thread using the asyncio.create_task function. I am ...
Yamen Alghrer's user avatar
-1 votes
1 answer
153 views

I have a next.js website that under the load 80 requests per seconds (for one pod) shows huge latency 20-30 seconds to handle a simple request like API call. I checked event loop lag and under the ...
Galina's user avatar
  • 556
0 votes
1 answer
55 views

We have a non-negotiable (compliance) requirement to verify a client certificate against a third-party REST service during SSL handshake for our Quarkus-based webservice. We implemented this using a ...
Jan Thomä's user avatar
  • 13.7k
0 votes
3 answers
106 views

In the below code I run 2 sets of tests where a timer is either split in 2 nested calls to setTimeout() and a single call with the timeout set to the sum of both previous calls. However, I notice that ...
Artem_3elt3er's user avatar
0 votes
1 answer
34 views

Why does NodeJs call the Event Loop method uv_run() twice when I executed the command: node file.js // file.js setTimeout(() => { console.log('1'); }, 0); output 1
Andres Diaz's user avatar
1 vote
2 answers
107 views

Most sources say that there are two queues in the Event Loop: microtask queue and macrotask queue. But also some sources highlight the third queue (callbacks generated by requestAnimationFrame) and ...
Anatoliy Gavrilov's user avatar
1 vote
1 answer
93 views

Event loop execution order I'm studying how the Javascript event loop works for a future presentation, but I've come across an unexpected behavior with the information I have so far. Simply put, when ...
Biel Santo's user avatar
0 votes
0 answers
84 views

I was going through the event loop in JavaScript and how it makes the JS to perform asynchronous operations even though it is a single threaded language. In that I learnt that the microtasks or ...
Krishna Sai Social Secretary's user avatar
-5 votes
2 answers
82 views

I have the following code: async function get_exam_score() { const exam_score = Math.random() * 10; if (exam_score < 5) { throw("You failed"); } } const promise = ...
Oriol Serrabassa's user avatar
1 vote
0 answers
27 views

This code as it is opens the browser and read a txt file line by line: line 1 line 2 line 3 Stream closed The thing I don't understand is why placing const browser = await puppeteer....
daego's user avatar
  • 329
0 votes
0 answers
38 views

I use Spring Webflux in my project. Also there is a Lettuce and grpc library, both use Netty.How can I get default EventLoopGroup from webflux and use it for Lettuce and grpc too?
Evgeny's user avatar
  • 33
0 votes
1 answer
132 views

In a .py module I created this function from utils.telegram_utils import telegram_message ... counter = count(1) def open_websites_with_progress(url): risultato = ...
Gabriele's user avatar
0 votes
3 answers
148 views

Code: setTimeout(() => console.log("1"), 1000) const startTime = Date.now() while (Date.now() - startTime < 5000); setTimeout(() => console.log("2"), 0) setTimeout(() => console.log("...
Vadim Sheremetov's user avatar
1 vote
1 answer
186 views

I've been exploring the async source code and noticed that the function _get_running_loop() is defined both in Python and has a note stating it's implemented in C (in _asynciomodule.c). # python3.11/...
OOD Waterball's user avatar
-1 votes
1 answer
146 views

In my fastapi application i have written test cases using pytest. My tests folder includes conftest.py import pytest from fastapi.testclient import TestClient from main import app @pytest.fixture(...
putta's user avatar
  • 85
-4 votes
1 answer
115 views

I have 2 expressjs servers: Server A: const express = require('express') const axios = require('axios'); const app = express() const port = 3000 function deepSleep (duration) { const start = new ...
Brian Phan's user avatar
3 votes
0 answers
460 views

I have this simple code in NodeJs const { eventLoopUtilization } = require('perf_hooks').performance; const { monitorEventLoopDelay } = require('perf_hooks'); const h = monitorEventLoopDelay({ ...
Taz's user avatar
  • 150
0 votes
1 answer
184 views

I need to integrate some code written using sdbus-cpp with my application's event loop, which is the GLib's GMainLoop. sdbus-cpp's IConnection interface declares the getEventLoopPollData() function ...
mardy's user avatar
  • 176
0 votes
1 answer
57 views

what happens if any event is register (like setTimeout) but it takes more time (assume 5,6 min ), and currently call stack and callback queue is completed all task and it is empty, so the program is ...
Mayank's user avatar
  • 11
0 votes
1 answer
401 views

I am running into this problem where the websocket will not close after I run an asynchronous function that asks for input ( i think its interrupting the main event loop or something).This code is ...
Gabriel Vanderklok's user avatar
0 votes
1 answer
124 views

I have a mongo class for my fastAPI application: ` from motor.motor_asyncio import AsyncIOMotorClient from config import settings import asyncio class Mongo: def __init__(self): client = ...
Hossein's user avatar
  • 15
0 votes
2 answers
101 views

I realized that I was confused with requestAnimationFrame, although some time ago I thought I understood how it works. So what is the essence of my problem: They say that requestAnimationFrame, namely ...
MaximPro's user avatar
  • 556
2 votes
3 answers
199 views

This class has async and sync methods (i.e. isHuman): class Character: def isHuman(self) -> Self: if self.human: return self raise Exception(f'{self.name} is not human') async ...
ZC13's user avatar
  • 58

1
2 3 4 5
23