Category "asynchronous"

How to deal with multiple async calls in the Wikipedia API

I want to find all the links contained on a Wikipedia page, but how can I get around the async execution? The below code fetches a list of page links. That I ca

Alternative to AsyncTask with HTTP POST request because it was deprecated

I made an android app 5 years ago that use AsyncTask to create an HTTP POST request to send a receive data from server, with two parameters. Any help would be a

Transaction rollback when @Async method fails

I am trying to read about Transaction but I cannot understand how would I rollback a async method call, is it even possible to do so. I am facing an issue wher

Returning data from async call in Swift function

I have created a utility class in my Swift project that handles all the REST requests and responses. I have built a simple REST API so I can test my code. I hav

Async/Await in fetch() how to handle errors

I have stripe async code in my React app, and trying to add error handling in my code but have no idea how to handle it. i know how to do it with .then() but as

WebAssembly blocks the web worker thread too

This is related to the previous question WebAssembly in async code Basically, that question is about the problem of the WebAssembly blocking the main thread, a

Javascript await / promise order of execution is not as expected

In my Nodejs project I would just like to await a mongoose.save function before continuing with my code. The below example does not work, but can anyone help me

Handle event emitter messages sequentially

myEmitter.on('data', handleData). How can I have handleData invoked sequentially and not in parallel ? For example: n data messages arrive grouped very close

setTimeout with Promises

I trying to solve a challenge with the following question: Implements a function that takes a number as a parameter and after x milliseconds (between an interv

How to return the response from an asynchronous call

I have a function foo which makes an asynchronous request. How can I return the response/result from foo? I am trying to return the value from the callback, as

Catch-all exception handling for outbound ChannelHandler

In Netty you have the concept of inbound and outbound handlers. A catch-all inbound exception handler is implemented simply by adding a channel handler at the e

How to use Promise.prototype.finally() in async/await syntax?

Actually my main question was using Promise.prototype.catch() in async/await ES8 syntax, Undoubtedly Promise.prototype.then() is existed in essence of async/awa

How to correctly structure a nested node-fetch request to avoid Promise<pending>?

I'm attempting to Fetch GET my website (with node-fetch) Scrape it with Cheerio to get specific posts Fetch GET from my CMS (with node-fetch) to check if there'

FastAPI runs api-calls in serial instead of parallel fashion

I have the following code: import time from fastapi import FastAPI, Request app = FastAPI() @app.get("/ping") async def ping(request: Request):

How to deal with IAsyncDisposable and IDisposable interfaces when no synchronous dispose available? [closed]

I am writing a Connection like class around an interop object. In particular, the closing of my connection is asynchronous. The object I am in

Best Practice winforms async/await keywords

Testing a bit TPL. I use this code and it works: async void button1_Click(object sender, EventArgs e) { MyClass2 mc2 = new MyClass2(); la

node.js async/await using with MySQL

I need to get all results synchronized and append to a string with async/await keywords like c#. I am new to node.js and I can not adapt this new syntax to m

TypeError: rl.question is not a function - NodeJS - using play.js

I’m trying to use the readline library within play.js which is an iOS app on my iPad. const rl = require("readline") rl.createInterface({ input: proces

Stop Parallel.ForEachAsync

In C#, I am interested in stopping a Parallel.ForEachAsync loop (considering the differences between Stop and Break); for Parallel.ForEach I can do the followin

Reactjs setState asynchronous

I am building a little search engine and got following problem: Everytime I enter a query, the last letter is missing. I figured out, that it has something to