Category "async-await"

How to run FastAPI server as multiple instances

I have developed a FastAPI Web Application. If I run the server and it is down or crashed for some reason. I need multiple instances of server to be running. I

React-query returns Cannot read properties of undefined even though I can see id is set

I am trying to learn react-query and been following quite a few guides. However everytime I try with parameters something goes wrong. This code that I have unde

`Task` blocks main thread when calling async function inside

I have an ObservableObject class and a SwiftUI view. When a button is tapped, I create a Task and call populate (an async function) from within it. I thought th

Not getting what's happening in the JavaScript script code below

async function async1(){ console.log(1) await async2() console.log(2) } async function async2(){ console.log(3) } console.log(4) setTimeout(funct

Why do await Task.Delay(10); stops execution in unity Web-GL?

I am using await Task.Delay(10); in unity C# for delay .After build and run in Web-GL format .The execution stops at this line that has delay .When I remove the

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

Cancelling an async/await Network Request

I have a networking layer that currently uses completion handlers to deliver a result on the operation is complete. As I support a number of iOS versions, I ins

How can i await for file to upload so i can upload next image with params

I am using Drag and Drop file to upload multiple images. ngx-file-drop How to use with async await to upload images because i want to send params to next image

Problem with emitting a list of rooms in Socket io

First of all, I'm very new to socket.io, so if someone would lend a helping hand it would mean a lot! :) I am making a simple chat app were a user can create or

Blazor WASM application stops responding after handling modal ok eventcallback, which performs a delete request

I implemented a delete button for a table, and when clicking the button a modal is shown to make sure the user really wants to delete that entry, but after the

ConfigureAwait(false) and struct implementation of IAsyncDisposable

I have implemented IAsyncDisposable with an ActionOnAsyncDispose struct as shown below. My understanding is that the compiler will not box it when it is in an a

Task.Delay() doesn't work with big TimeSpan (an hour), but works with smaller (10 minutes)

My code is: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using Sy

WinForms Form is never garbage collected due to reference from ServiceScope

I have a WinForms Form(s) that is not always garbage collected. The form loads quite a bit of data and when it is not garbage collected, it can cause a signific

Pyrogram Message Handler Not Working when used with uvloop

I am New to Python Also Mew to Programing and if i did anything wrong please tell me i have created a Telegram Bot(Simple Echo Bot) using Pyrogram which work's

Is there a way of assigning a future variable to another variable without returning null in dart?

I was trying to pass a data to a variable that returns future but it returns out to be null even though I'm using async and await. what is I'm missing here ? im

How to call async function in sync code and break async/await chain (i.e. how to wrap an async function in a sync function)

All my code is written without asyncio in mind; however, I use one function that is async (written by another developer; for my purposes it's a black box). Let'

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

Swift Playground with async/await "cannot find 'async' in scope"

I'm trying to run this async function on Xcode Playground: import Foundation import PlaygroundSupport PlaygroundPage.current.needsIndefiniteExecution = true e

'async' call in a function that does not support concurrency swift ios Xcode async/await

I'm trying to use async/await with Swift 5.5. I have my async function, but whenever I try to call it, I get this error: 'async' call in a function that does