Skip to main content
0 votes
2 answers
48 views

How to run a function after a specifik component is rendered in React? [duplicate]

I'm working on my navbar. I have a header with a component within called HeaderSearch. What I want is to run a function each time the user clicks outside of the HeaderSearch. And then add an animation ...
GoldenBags's user avatar
0 votes
0 answers
23 views

How to run a function after a specifik component is rendered in React? [duplicate]

I'm working on my navbar. I have a header with a component within called HeaderSearch. What I want is to run a function each time the user clicks outside of the HeaderSearch. And then add an animation ...
GoldenBags's user avatar
1 vote
1 answer
53 views

Python Asyncio source code analysis: Why does `_get_running_loop` in Python execute the C implementation instead of the Python one?

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
0 votes
0 answers
76 views

How to fork Qt6 program

I have already exhaustively googled this topic, and the answer is "don't do it". However I am kind of stuck between a rock and a hard place, so I need to thoroughly explore this topic before ...
Mr. Developerdude's user avatar
0 votes
1 answer
32 views

Event loop is closed- pytest- FastAPI

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
  • 77
0 votes
0 answers
25 views

why setTimeout executed first then the setImmediate in nodeJS-v20.11.0 [duplicate]

console.log("---------Event Order---------"); const fs = require('fs'); const path = require('path'); const currentDir=__dirname const fileName='example.txt' const filePath=path.join(...
Rishu Singh's user avatar
0 votes
1 answer
44 views

Priority of react's useEffect in Event-Loop

Background react 18.3 chrome browser v127 Question import { useEffect, useState } from 'react' function App() { const [state, setState] = useState(0); console.log(1); queueMicrotask(() => ...
Byeongin Yoon's user avatar
0 votes
0 answers
42 views

Event loop of node.js produces unpredictable results

While exploring the node.js event loop, I realized that poll events appear in some random order, rather than following the order described in the event loop. The logic of the code is trivial: we ...
MaximPro's user avatar
  • 559
-6 votes
1 answer
66 views

Node/ExpressJs fail to handle 1000 requests at the same time

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 ...
Duy Phan's user avatar
0 votes
0 answers
40 views

useEffect and promise priority in inital and subsequent renders

I have below code and help me to find the output with accurate explanation. 'infiniteLoopProtection:false' import * as React from "react"; import { useState, useEffect } from "react&...
Rajneesh Mishra's user avatar
0 votes
0 answers
36 views

Why does a blocked Electron main process block the renderer process, even without IPC?

Based on the Electron process model, I expected that a blocked main process would not cause unresponsiveness in a renderer process, unless that renderer process is somehow waiting on the main process. ...
jameshfisher's user avatar
  • 36.7k
2 votes
0 answers
129 views

Event loop delay

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
  • 108
0 votes
0 answers
84 views

How do debug and monitor blocked event loop in Node JS

I am using Express, Node 18, and JS for my back end. Also doing clustering using pm2. Weirdly enough, I can see that some of my APIs get very slow randomly. CPU and Memory remain fine (I know because ...
Anubhav Malik's user avatar
0 votes
0 answers
45 views

qasync with IPython hangs on run_until_complete

I would like to have an asynchronous gui with PyQt5. The synchronous version of what I want would look like this: from PyQt5.QtWidgets import QPushButton, QMainWindow import asyncio import time import ...
Marc's user avatar
  • 1
1 vote
1 answer
54 views

When using AsyncClients in Google Cloud Python SDK, got future attached to a different loop

I'm quite new to using asyncio in Python. Originally I have a sync function speak: from google.cloud import texttospeech client = texttospeech.TextToSpeechClient() def speak(*args): # omitted ...
Henry M's user avatar
  • 85

15 30 50 per page
1
2 3 4 5
76