Category "asynchronous"

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

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

Boost Beast async_write() With Queue

I have the following code: std::queue< nlohmann::json > outgoingMessages; void session::do_write( void ) { if ( outgoingMessages.size() > 0 ) {

Check or listen continuously to internet connection/Network Connectivity in dart, flutter app

I have been searching for long to know the best approach to listen to internet connection in flutter/dart app. I think this approach is better for now and it ca

Is it safe to use mutable let bindings inside task CEs or async CEs?

When you think you know, you don't know, is what went through my head earlier today. While going over someone's code I noticed something similar to: task {

How to write an asynchronous Policy handler, injecting a scoped service

I'm trying to write a custom policy for an ASP.NET Core 3.1 web application, using a custom Identity storage provider. I've tried to wrap my head around the fa

Is Scrapy Asychronous by Default?

I recently ran a spider in my project but I feel like scrapy it is waiting until one page is finished to move on the other one. if I am correct in scrapy's natu

Property does not exist on type void

I am writing a hook to make a post request that returns two properties, sessionId and sessionData. I am using this hook in a component. My hook looks like this.

Why is my variable unaltered after I modify it inside of a function? - Asynchronous code reference

Given the following examples, why is outerScopeVar undefined in all cases? var outerScopeVar; var img = document.createElement('img'); img.onload = function()

FileStream.ReadAsync blocks UI if useAsync is true, but doesn't block UI if it's false

I read about the useAsync parameter in this FileStream constructor: FileStream(String, FileMode, FileAccess, FileShare, Int32, Boolean) I tried to use the Fil

Error while popping out Flask app context

I am trying to create an async API using threading (Celery is an overkill in my case). To achieve the same, I subclassed the Thread class in following manner. S

How can I effectively use boost::process::async_pipe for both writing and reading?

I've already seen the boost::process tutorial... but there the example is a single write then a single read from the child process. I want to know if it is poss

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