Category "asynchronous"

Complex keyboard input to child process in C, Linux

Ive been trying to solve this one for some time but im unable to come up with a solution. I need a child process to understand complex WASD keyboard input (with

Flutter: converting an Image object to a base64 string without using a File

I grabbed somewhere the following code to convert a picture to a base64 string without accessing a file : String ImageToString(Image image) { String result;

Is dereferencing a smart pointer async signal safe?

Let's that my C++ code has registered signal handler. According to signal-safety(7) all code called from within the handler, must use async-signal-safe function

How can I return an Observable with data of other Observables using his return value in the others

I have a project in which I want to return an Observable of Hero object. My heroes have multiple id properties to fetch data from other Observables as a Skill o

How can I create a Task that can cancel itself and another Task if needed?

Let's say I have a simple UWP app (so no .NET 5 or C# 8 without workarounds irrelevant to this situation), with many pages that contain buttons, all of which mu

How can I create a Task that can cancel itself and another Task if needed?

Let's say I have a simple UWP app (so no .NET 5 or C# 8 without workarounds irrelevant to this situation), with many pages that contain buttons, all of which mu

How to calculate window width based on getBoundingClientRectAsync values of another element?

Is it possible to calculate viewport or window width based on getBoundingClientRectAsync values of element which is in virtual DOM? Running JS in web worker (am

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

Flutter Error when creating SQL DB table by giving tableName parameter

I found a flutter sqfl example on the web and trying to modify it for my personal project. I need more than one table in a database, so I want to be able to cre

CompletableFuture, run asynchronous code after "join"

I'm facing some trouble after some month only on Javascript/Typescript. For example, let see this snippet: @Test public void testAsync(){ Completabl

What thread runs the code after the `await` keyword?

Let me just post a simple example: private void MyMethod() { Task task = MyAsyncMethod(); task.Wait(); } private async Task My

Add to list elements Async in Java

I'm rather new to JAVA and have a problem similar to the one mentioned below, where I want to add elements to an array via async processing. However, the return

future got attached to different loop

Task <Task pending name='Task-11' coro=<Queue.get() running at C:\Users\Administrator\anaconda3\lib\asyncio\queues.py:166> cb=[_release_waiter(<Futu

What was the motivation for introducing a separate microtask queue which the event loop prioritises over the task queue?

My understanding of how asynchronous tasks are scheduled in JS Please do correct me if I'm wrong about anything: The JS runtime engine agents are driven by an e

Modifying WebHook Message With Discord.Net c#

using (DiscordWebhookClient client = new DiscordWebhookClient(WEBHOOK_URL)) { ulong z = 42342340290226; client.ModifyMessageAsync(z);//Not sure how I wo

Control of flow in Typescript

I am trying to call a function which will retrieve data from a storage object. I need to do this and assign the returned storage value before the next function

Can not import async function from module in python

I am currently trying to import an (selfwritten) async function in python, but the compiler gives me an error message. See the minimalistic example below (yes I

Task Runner in Javascript

I have a list of tasks and all these tasks need to be executed only after all the dependencies are resolved for each task. I am struggling to figure out a way t

Telegram Message Listener - RuntimeError: Event Loop is closed

I want to receive new messages from Telegram via a python script. I filter the message and then put out the result. But there is something wrong with the loop s