event-loop Questions
5
Solved
I have a small GUI test with a "Start" button and a Progress bar. The desired behavior is:
Click Start
Progressbar oscillates for 5 seconds
Progressbar stops
The observed behavior is the "Start...
Contributory asked 25/5, 2013 at 1:16
0
i'm trying to understand the output of a test that i've been running because it seems to go against everything that i'm reading and hearing about how the node.js event loop works. supposedly ...
Boyle asked 17/4, 2024 at 10:11
2
Solved
At which point during the JavaScript event loop does it figure out that a timer has reached its target time and needs to be placed on the macroQueue? Does it do this check after completing each mac...
Dees asked 20/3, 2024 at 22:18
1
I am trying to understand potential slowdown in my FastAPI app.
My understanding is that each time I do an await, a task is scheduled for later, creating a backlog of task to be executed. If the pr...
Trinl asked 13/3, 2024 at 15:9
4
Solved
Calling setTimeout with setImmediate has unpredicted behaviour if using CommonJS modules. But if you switch to ESM ("type": "module" in package.json), it will always execute set...
Maharajah asked 30/12, 2023 at 18:18
3
I'm trying to understand node.js single threaded architecture and the eventloop to make our application more efficient. So consider this scenario where I have to make several database calls for an ...
Brisling asked 12/7, 2020 at 15:3
6
Solved
I've just finished reading the Promises/A+ specification and stumbled upon the terms microtask and macrotask: see http://promisesaplus.com/#notes
I've never heard of these terms before, and now I'...
Tincher asked 18/9, 2014 at 14:36
3
Solved
I have a function that interfaces with a telephony program and calls people. I want to know, is there a method that I can use to call folks for a certain amount of time?
I'd like to run a loop like...
Wilkison asked 19/2, 2013 at 21:58
1
Solved
When using python async/asyncio, I often create and complete asyncio.Future objects from threads that are not the thread running the event loop.
Unless I complete those futures in the thread that i...
Natala asked 11/4, 2022 at 16:33
1
Let's imagine we have a file containing next JS code:
process.nextTick(()=>{
console.log('nextTick')
})
queueMicrotask(()=>{
console.log('queueMicrotask')
})
console.log('console.log')
a...
Trescott asked 29/12, 2021 at 11:47
1
Solved
I want my FastAPI app to have access to always actual bot_data of python-telegram-bot.
I need that so when i call some endpoint in FastAPI could, for example, send messages to all chats, stored som...
Slickenside asked 30/4, 2023 at 16:50
1
The following code:
process.nextTick( () => console.log("nextTick 1") );
process.nextTick( () => {
console.log("nextTick 2");
Promise.resolve("Resolved promise in...
Doy asked 12/6, 2021 at 14:3
7
Solved
If you have worked with gui toolkits, you know that there is a event-loop/main-loop that should be executed after everything is done, and that will keep the application alive and responsive to diff...
Optometer asked 18/3, 2009 at 14:12
1
I'm trying to use match case when checking the value in event loop. However break not only break the match case, but break the event loop too.
This is the code
while True:
# Some code stuff here
...
Unreasonable asked 17/5, 2022 at 11:28
1
I have a simple flask API with one endpoint that calls a method in another file to render some javascript from a site using request-html
@app.route('/renderJavascript')
def get_attributes():
retu...
Overture asked 28/10, 2019 at 2:46
1
Solved
So I am in the process of migrating a MV2 extension which used persistent Background pages to MV3. In the Chrome migration guide [https://developer.chrome.com/docs/extensions/mv3/migrating_to_servi...
Ori asked 21/11, 2022 at 8:2
1
Faced a problem. I need to load information about objects and their properties into a database. I do this using a class with async methods that both use that class's (self.__session) attribute. If ...
Solomon asked 5/9, 2022 at 18:30
4
Solved
I am aware JavaScript is single-threaded and technically can’t have race conditions, but it supposedly can have some uncertainty because of async and the event loop. Here’s an oversimplified exampl...
Oliveira asked 2/8, 2022 at 6:18
1
Solved
This is the Node event loop.
┌───────────────────────────┐
┌─>│ timers │
│ └─────────────┬─────────────┘
│ ┌─────────────┴─────────────┐
│ │ pending callbacks │
│ └─────────────┬─────────────┘
...
Lalitta asked 30/7, 2022 at 15:7
2
Solved
I am confused by the following paragraph of the Node.js documentation.
setImmediate() vs setTimeout()
... The order in which the timers are executed will vary depending on the context in which the...
Fyke asked 1/7, 2022 at 19:59
5
Solved
I've been getting more into the internals of the Node.js architecture, and a term I see coming up a lot is "tick" as in "next tick of the event loop" or the function nextTick().
What I haven't see...
Comeback asked 6/11, 2013 at 20:57
3
I have a question about how the event loop in python's asyncio module manages outstanding tasks. Consider the following code:
import asyncio
@asyncio.coroutine
def a():
for i in range(0, 3):
pr...
Edile asked 21/1, 2017 at 23:19
2
Solved
In some of the online resources on asynchronous behavior of JavaScript, concepts like browser architecture, call stack, event loop and event queue are also mentioned. While describing the workings ...
Ramon asked 16/5, 2021 at 7:26
1
Solved
I made an example of 'setTimeout vs requestAnimationFrame' to find out how different they are.
As you can see, the orange box arrives to the destination first. The green box jump some times and slo...
Protamine asked 18/3, 2022 at 6:2
3
Solved
I've seen that I can repeat a function with python every x seconds by using a event loop library in this post:
import sched, time
s = sched.scheduler(time.time, time.sleep)
def do_something(sc):
...
Choanocyte asked 21/1, 2022 at 10:17
1 Next >
© 2022 - 2025 — McMap. All rights reserved.