Category "async-await"

Discord Python bot - Coroutine never awaited

I'm trying to make a Blind-test bot game in Python, which actually works pretty fine. I managed to get a whole spotify playlist in the queue with that play_next

Flutter - how to trigger a function after the async function is completed

Hi I would like for the addUserToFirestore() function to trigger after the code above has done being executed Future<void> registerAccount( String e

How does an async function called with await can block the event loop?

In the following code, the 'Hey, timeout executed!' is only printed after the loop in the longLoop function is finished. setTimeout(() => console.log('Hey, t

.then running before data is returned from fetch

I want show_name() to run and then call another function. I don't understand why show_name().then fails. I'm probably overlooking something. async

I am getting this issue, I tried using kotlin coroutines and Async still getting the same Calling this from Your main thread can lead to deadlock,

I also made another class that implements runnable to make a new thread still it's now working, Also tried with Aynctask. At last, I made a view model but still

javascript - await promise stucks

I am implementing google video person detection . I completely followed their docs and implemented same script they provided But my code is not passing by this

Call async function in Enum

I want to refactor my code from sync to async. I use Python and FastAPI. I use the method which calls async function in Enumaration. For example: from enum impo

PendingRollbackError when accessing test database in FastAPI async test

I'm trying to mimic Django behavior when running tests on FastAPI: I want to create a test database in the beginning of each test, and destroy it in the end. Th

Threadpool not starting any new threads, but is below limit

I have a app that uses async tasks to get Data from a MQTT server. After I updated my System to Windows 11 I started noticing the Problem that the async tasks a

MessageMediaUnsupported() instead of MessageMediaPoll() type when using Telethon

When I receive a message, my client waits until he receives a message that has media type = MessageMediaPoll(), it worked, but the bot has been updated and now

MessageMediaUnsupported() instead of MessageMediaPoll() type when using Telethon

When I receive a message, my client waits until he receives a message that has media type = MessageMediaPoll(), it worked, but the bot has been updated and now

Response file stream from S3 FastAPI

I am trying to return a response of a picture from S3. In StreamingResponse.stream_response I see, that chunks are read from the stream and sent to the socket.

Simple practical example to see faster async functions and promises from node 10 to node 12, and up

Before I ask my question I want to make this clearly, I know benchmarks never tell the whole story. But my goal here is relatively simple, I want to see the per

How to make a Timer.periodic function fire right away after calling it Flutter

I'm trying to use a Timer.periodic function in flutter and it seems that when I call it, it waits for the specified duration that I put in for the time between

Error: socket hang up in Http Request made in Node JS using request-promise causing for loop to restart

I am trying to make an Http Request using request-promise inside a for loop. But it seems if a Http Request takes long, request-promise closes the connection.

Ballerina Swan Lake - How to alternatively wait on a dynamic set of Ballerina future values?

I have a requirement of writing a ballerina util function that can alternatively wait on a given set of futures and return the result, where the number of futur

How do I fix a "System.Net.Http.HttpRequestException: TypeError: Failed to fetch" in Blazor WebAssembly?

The code below, runs for about fifteen seconds on the "dataFs = await _Http.GetStreamAsync(BODIST_DATA_HTTPNAME)" line before failing with a "System.Net.Http.Ht

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

async await with setInterval

function first(){ console.log('first') } function second(){ console.log('second') } let interval = async ()=>{ await setInterval(first,2000) await se

async/await "List<> does not contain a definition for 'GetAwaiter'"

I apologize for sounding dense, but I swear I have read up on async/await and played with examples, but I am still stumped at simple things like why the followi