Most voted "async" questions
Asynchronous programming is simply to allow certain portions of code to be executed by separate threads.
Learn more…153 questions
Sort by count of
-
1
votes2
answers314
viewsConditional with async in flutter
I have the following function, which returns me either "FREE" or "PREMIUM". The return of the database works perfectly. Here is the code. userInfoConst() async { try { var uid = await…
-
1
votes0
answers56
viewsSELECT Asynchronous with PYTHON
Hello everyone, thank you!! I am trying to make some connections to a Mysql database in asynchronous mode where there is dispute and print on the screen the result that arrives first... but I am not…
-
1
votes1
answer43
viewsReturn the value of an async function
Hello, I’m hitting myself to write the code below const request = require('request-promise') const cheerio = require('cheerio') var fs = require('fs') const URL…
-
1
votes2
answers93
views -
1
votes1
answer39
viewsUse value that is filled after a Promise
Guys, I’m developing an application that, according to the code below, searches the data in an API and with the result of this, makes other calls and makes a push in a variable, how can I access…
-
0
votes1
answer114
viewsProblems with Thread on Android
I have a listview to be populated/fed by a webservice, but only load my images with a handler. I want to use a Thread, but only run with a Handler and I don’t understand why... Can someone help me?…
-
0
votes0
answers383
views@Retryable and @Async com spring
It is possible to create an asynchronous method that can be tried again if some exception occurs with spring? @Retryable @Async public void myMethod() throws Exception { // Do some stuff }…
-
0
votes0
answers111
viewsXml components are not loaded into Activity
Editing: I just found out that if I comment on the lines that cause the error, it gets all black screen... IE, does not load the layout. I’m trying to get a Progressbar and a Textview so I can make…
-
0
votes1
answer86
viewsMake variable wait function to be generated
I have the following code: XmlParaApi = xml; that passes a string variable (xml) to a string global variable (Xmlparaapi). Until then all this code is in an Api, the Gora my problem is with the code…
-
0
votes0
answers47
viewsWhy my Asynctask Freeza?
The moment I instate an object EmailTask the app hangs =( public void send(View view){ EditText text = (EditText) findViewById(R.id.editText); Switch iluminacao = (Switch)…
-
0
votes1
answer85
viewsOperation Async how to know when completed?
I have 2 methods Async what to make a Insert in a cloud database.. For internet reasons, there may be transaction failure to treat this problem, I am using Commit and RollBack, to ai blz. However, I…
-
0
votes1
answer115
viewsActionresult and async method Using Fastmapper, Typeadpter Error
I have the following problem with Fastmapper. When implementing an Actionresult async when using Typeadapt it cannot perform the asynchronous conversion, would anyone know how to do the conversion…
-
0
votes1
answer198
viewsPython asynchronous generators
With the introduction of the library asyncio, a new syntax was introduced to define coroutines in Python >= 3.5 and with it it it is possible to define asynchronous methods, asynchronous…
-
0
votes0
answers48
viewsAccess to Asynchronous Webservice
I am working on a project, where I run an asynchronous webservice (project pattern), but I am in trouble because the webservice has not yet completed the execution and my continuous processing…
-
0
votes1
answer72
viewsHow to create a method that does not wait to finish to return OK
I need to create a method that returns "OK" immediately, without waiting for a method called by it to end. how to do this? [WebMethod] public string ImportaDadosPosLeilaoValores(string fileName) {…
-
0
votes0
answers46
viewsAspnet Core Synchronization Context (deadlock)
I had a problem with deadlock in my code in . Net framework, follows below the excerpt from it: public IHttpActionResult Get() { AsyncCall().Wait(); return Ok("Ok"); } private async Task…
-
0
votes0
answers84
viewsAsynctask and Fragments
Hello, I’m new to development and have some questions. I have to implement a new layout, where: I converted the activities that load the data into fragments; In a new Activity the graph fragment is…
-
0
votes0
answers89
viewsAsynchronous Action Error (Async)
This action should send an Asynchronous email, all very simple so far, including using the same class in other projects with the same version of MVC. But to my surprise, this project does not run.…
-
0
votes1
answer436
viewsHow to perform asynchronous tasks in PHP?
I have a simple virtual shop system, where the customer places an order for certain products and the system records this, at the moment the customer logs the order the system sends an email message…
-
0
votes1
answer52
viewsQueuing Problems for Asynchronous Controllers
Hello, I’m having some problems regarding the Asynchronous Controllers, because the queuing of requisitions server keeps being locked to the client during some operation. The routines work exactly,…
-
0
votes1
answer672
viewsTraffic lights in Javascript
How can I create traffic lights in Javascript? I have an asynchronous script that runs n times, I wish that when the n tasks had another task been executed. I used normal access to a variable but…
-
0
votes1
answer90
viewsHow to use Unload with angular JS?
Unload should be called when leaving the page and hit any url from another site. In an old version, without Angular JS, doing this, works normal, it calls the request, when I turn on the debug the…
-
0
votes1
answer145
viewsAngular asynchronous ng-repeat
I am using Angular 1.6.10 to show the data of an API, as the data search is asynchronous, I believe ng-repeat runs before the data is loaded: angular .module('appDataPOA', [])…
-
0
votes2
answers929
viewsHow to use async/await in void return methods?
I have a problem in my application, where due to the large volume of processing, my Form lock. During my researches I found that a method async resolves this, however the functions performed on my…
-
0
votes0
answers56
viewsHow to call methods so that they have a delay?
I have a class: public class Robo { public async Task Ligar() { /* * Algo que pode demorar ou nao depende do status do robo * */ } } public class TesteRobo { public void Main() { List < Robo >…
-
0
votes2
answers55
viewsAsync function returning before result
I have this function in JS, using Forge library, for generating pair of keys. The problem that when trying to use the async function to perform the generation, the function is returning before…
-
0
votes2
answers199
viewsI’m trying to use an asynchronous function in python-3, but it’s giving error
Error: Warning (from warnings module): File "C:\Users\tiago.pereira\Desktop\python\kivy\kivy_teste.py", line 43 pythoncom.PumpMessages() RuntimeWarning: coroutine 'Keyboard' was never awaited…
-
0
votes1
answer347
viewsHow to chain async functions in typescript?
I have two asynchronous functions A and B. How do I initialize function B only after function A is complete? import { Component } from '@angular/core'; import { Options } from 'fullcalendar'; import…
-
0
votes1
answer526
viewsAsync/Await, where are you wrong?
const url = 'http://files.cod3r.com.br/curso-js/funcionarios.json' const axios = require('axios') const busca = () =>{ return new Promise((resolve, reject) =>{ try{ const funcionarios =…
-
0
votes0
answers76
viewsDoubts on the applied use of async/await with Angular
Good morning, Even reading about the concepts and uses of async and of await I’m still having problems with their actual application. Basically in my ngOnInit call for a function: ngOnInit() {…
-
0
votes0
answers441
viewsAngular life cycle
I’m having some doubts about the life cycle in Angular 7, when making a request for a certain API needed before I have picked up your token that also comes through the API, in another get. The doubt…
-
0
votes2
answers81
viewsNodejs Async / Await / Promisse
I have a question, I need to make the code below, wait for the . map to be executed, and parseCategory() calls an API to get the articles. It turns out that the "final..." console output is executed…
-
0
votes1
answer132
viewsData synchronization, mysql and Promise
I’m a beginner in Node.js and I’m trying to understand why I can’t bring the expected result of my API. I have an application that sends an array of data to an API on Node to be saved to the…
-
0
votes1
answer72
viewsDoubt when using a Query answer in Nodejs
Well, first, I have two files: index.js that handles the requests and another that selects in the database, but I don’t know how to return it to the client. app.get('/pesqAlimentos', (req, res)…
-
0
votes1
answer31
viewsException coming from a LIB and closing the system c#
I made a lib to manage the part of a system of mine, until then everything is ok, the problem occurs when this lib launches an Exception: public async void Update(ObjetoPostalModel objeto) { await…
-
0
votes2
answers154
viewsPromise async/await not resolved
I am doing . map() in an array, to do a Mongoose/Mongodb query with each element of this array and returns another array with the results. However, after this process, I try to access the new array…
-
0
votes1
answer46
viewsManipulating Async/Await function return with JSON.parse - REACTJS
I have the code below that is returning an error where I am not understanding how to solve. The log console of "Ret.value" returns {"id":1,"name":"Max"} string correctly, but in JSON.parse. Argument…
-
0
votes1
answer125
viewsMultiple image upload with Fetch API
I have the following code: HTML: <input type="file" name="image[]" class="selecao_arquivo" id="selecao_arquivo" multiple> Javascript: sendInsucesso.addEventListener('click', e => {…
-
0
votes1
answer42
viewsIs it possible to use ASYNC AWAIT when receiving a PROMISE return?
I would like to know if it is possible to receive the return of a Promise using async await? I created a file where I read a file and return the string of that file, to receive this variable, in my…
-
0
votes0
answers22
viewsAsynchronous Tasks using Kotlin Coroutines
I’m readjusting an application and need to implement asynchronous routines using the coroutines. I am currently trying to use the function 'Globalscope.Launch(Dispatchers.Main) {}' as an alternative…
-
0
votes1
answer30
viewsDisplay Future variable on an Elevatedbutton
I am making the call in my database of the boarding number, I need to put this number inside a button, but my variable "boarding" appears as undefined inside the Elevatedbutton import…
-
-1
votes1
answer54
viewsAs I inform a condition for when the screen is changed the timer.Eriodic cancel
Today I use so with the code below, but it doesn’t work very well, because when changing screen the query continues to be executed in background. Future _refresh() async { if (_statusLote !=…
-
-1
votes1
answer183
viewsHow to do a while without locking the application in Java
I’m building an application in college that I need to run a code for 2 minutes and minute to minute to do an evaluation of the system and the variables that are in it. I’ve looked on the Internet,…
-
-1
votes1
answer47
viewsSqlitedatabase db error = this.getWritableDatabase();
public ArrayList<String> addMigracaoCadIndividual(String QUERY){ SQLiteDatabase db = this.getWritableDatabase(); return null; } java.lang.Nullpointerexception at…
-
-1
votes2
answers375
viewsCalling another class method in a Task c#
I’m trying to make a task call from a method of another Class: Diretorios diretorios = new Diretorios(); await Task.Run(() => diretorios.CopiaDiretorios(tbxVersaoAtual.Text,…
-
-1
votes1
answer92
views -
-1
votes1
answer2287
viewsUnhandled Promise rejection typescript and Node.js
Good night to you all! I am developing an app with React, Node and typescript and was programming a route with post method for inserting data using sqlite database and testing in India but when…
-
-1
votes1
answer39
viewsCatch Return of Async Function in External File
I have 2 files in both async use / await and return a promisse. So far so good. But my question is what to call them in Controller. I’m managing to return all recipes, however, I’m not able to add…
-
-1
votes0
answers8
viewsasynchronous import to jest.mock to keep the simulation file separate and reusable for other tests
I am trying to make an import into my play simulation to use a separate file to play the same simulation in multiple codes. Simulation below: const listCache: Array = []; jest.mock('aws-sdk', ()…
-
-1
votes0
answers29
viewsProblem with asynchronous nodejs
I’m with a method in a class that calls the method another class and after that he gives a console.log of the return of this method. But this console.log is executed before the function call causing…