Category "asynchronous"

How to get data from MySQL and after 30 second fetch it again in Node.js?

I'm trying to do is fetching the data according to timestamp from DB once (call it origin) and wait for 30sec fetch it again with same query(call it recent) in

Returing result of synchonous function inside async function in python

I'm newbie in the world of python and have been trying to solve the following for last 3 days on my own. I read many articles online none of them address my pro

Multiple coroutine async calls performance / high delay issues

I am currently debugging a performance issue (see here) which I could reduce to a code snippet that uses multiple async{} calls in a coroutine. I am delaying by

Single thread and asynchronous confusion

I've read various articles and similar questions, and I know that the two concepts are different, but I don't seem to know the correct answer. I understood that

Build an event handler using elements from two fetch/then chains

Context and goal I have two fetch/then chains that build elements that I need for an event handler. The first chain loads data to build a <select> element

Complex keyboard input to child process in C, Linux

Ive been trying to solve this one for some time but im unable to come up with a solution. I need a child process to understand complex WASD keyboard input (with

Flutter: converting an Image object to a base64 string without using a File

I grabbed somewhere the following code to convert a picture to a base64 string without accessing a file : String ImageToString(Image image) { String result;

Is dereferencing a smart pointer async signal safe?

Let's that my C++ code has registered signal handler. According to signal-safety(7) all code called from within the handler, must use async-signal-safe function

How can I return an Observable with data of other Observables using his return value in the others

I have a project in which I want to return an Observable of Hero object. My heroes have multiple id properties to fetch data from other Observables as a Skill o

How can I create a Task that can cancel itself and another Task if needed?

Let's say I have a simple UWP app (so no .NET 5 or C# 8 without workarounds irrelevant to this situation), with many pages that contain buttons, all of which mu

How can I create a Task that can cancel itself and another Task if needed?

Let's say I have a simple UWP app (so no .NET 5 or C# 8 without workarounds irrelevant to this situation), with many pages that contain buttons, all of which mu

How to calculate window width based on getBoundingClientRectAsync values of another element?

Is it possible to calculate viewport or window width based on getBoundingClientRectAsync values of element which is in virtual DOM? Running JS in web worker (am

Return not waiting for if condition

any one can help me.. I am developing a small project in Electron js. as a beginner I could not find any solution for this issue. I have search a lot similar pr

What is the order of execution/control flow of "await" in javascript?

I have this piece of code and I'm struggling to understand why the log order is "1,3,2". (async () => { const doSomething = async () => { cons

Flutter Error when creating SQL DB table by giving tableName parameter

I found a flutter sqfl example on the web and trying to modify it for my personal project. I need more than one table in a database, so I want to be able to cre

CompletableFuture, run asynchronous code after "join"

I'm facing some trouble after some month only on Javascript/Typescript. For example, let see this snippet: @Test public void testAsync(){ Completabl

What thread runs the code after the `await` keyword?

Let me just post a simple example: private void MyMethod() { Task task = MyAsyncMethod(); task.Wait(); } private async Task My

Add to list elements Async in Java

I'm rather new to JAVA and have a problem similar to the one mentioned below, where I want to add elements to an array via async processing. However, the return

future got attached to different loop

Task <Task pending name='Task-11' coro=<Queue.get() running at C:\Users\Administrator\anaconda3\lib\asyncio\queues.py:166> cb=[_release_waiter(<Futu

What was the motivation for introducing a separate microtask queue which the event loop prioritises over the task queue?

My understanding of how asynchronous tasks are scheduled in JS Please do correct me if I'm wrong about anything: The JS runtime engine agents are driven by an e