Category "async-await"

Is it possible to make await + setTimeout + for loop work together?

I use async and for loop to test for fetch issues that might be caused by network or other issues. but testing too often It generates a request error similar to

Promise returns undefined nodejs

i am back with a same issue for my promise returning undefined please help. Here, i am using ipfs to save data with savedata() which takes in a json string,a do

Can't stop the asynchronous flow

I have the following function: const handleSubmit = async (event: React.FormEvent<HTMLFormElement>) => { event.preventDefault(); const

C# Autofac ParameterFilterAttribute hangs when using Task.Run()

I have 3 classes: Apple1, Apple2, and Apple3. Apple2 depends on Apple1 and Apple3 depends on Apple2 like follows. public class Apple1 { } public class Apple2 {

How to use async calls in WPF event handlers

I have this event handler in WPF with async call. private void Button_Click(object sender, RoutedEventArgs e) { var folderStructure = restApiProvider.GetFol

Is not awaiting for a promise an anti-pattern?

I'm having an application where I have a function which exectues a task, but that task needs to do follow up, but not related to the task, so shouldn't be await

Why my program is not executing beyond await UploadAsync?

I am trying to upload a file through stream to azure file share. This is my function : public static async Task UploadFile(string shareName, Stream content, str

Queuing async tasks and passing back result to caller

In my app I have a single Client class responsible to do communication via TCP/IP and I have several async Processes posting "work" to the Client class. What I

Pipedream, getting trigger event data with sync function

i'm wondering hot to get pipedream to do an nodejs action, but i need to use the trigger event (HTTP POST) to get some info, the thing is that i cant wonder how

Error while fetching data using FindAsync in C#

I am getting this error "A second operation started on this context before a previous operation completed. This is usually caused by different threads using

async/await, Task and [weak self]

Okay so we all know that in traditional concurrency in Swift, if you are performing (for example) a network request inside a class, and in the completion of tha

Await not returning in SpecFlow async test step

I'm having trouble with some async SpecFlow unit tests where an await is never returning. I think that it is to do with the SpecFlow SynchronizationContext, but

Async calls within setInterval where every next is dependent on previous

I have a setInterval setup which internally calls an API. Based on the api response I manage previousState & currentState variables. I need to make sure tha

Async task getting value off of JSON return, XAML/WPF app

I am trying to get a single value off of a JSON return. My call is doing an HttpClient call to a webservice, it returns me my Json object. I need to now get a v

vitest test await async completion of onMounted callback in vue3 component

I'm playing around with Vitest and want to wait for the completion of a couple mocked fetches in the onMounted lifecycle hook in my component: My test: import {

Get interaction's reponse message object discord.js

Si I have this really simple command : let row = new Discord.MessageActionRow().addComponents(...) // The .. is too long so i'll just remove it for this questio

How to add CancellationToken on Unity Web request?

I wrote the following code that successfully downloads a photo from the link. But I want to set a cancellationToken for the request that can be activated by pre

how to implement Coroutine async/await on BaseViewModel

I'm using Retrofit with Coroutine using this structure to hit the API requests in my app but at some screens I send multiple request and I want to only show dat

Async function not running some code even inside await

I have a Node.js AWS Lambda function created via the serverless framework. I have multiple helper functions inside it. I am having an issue with one of them due

Is the async keyword required to create asynchronous functionality? Did this functionality change in the recent past?

I'm attempting to show that it is possible for my team to add asynchronous functionality to a currently "fully-syncrhonous" program. Are there any reasons, such