Questions tagged as 'async'

2
answers

Task with AsyncTask only runs once, then does not arrive on doInBackground

I'm facing a strange problem in my application, since I'm testing on 4 different devices but only two of them have the expected behavior. Scenery / Devices: Nexus 4 / Android 5.0 - Ok Galaxy Tab 2 / Android 4.2.2 - Ok LG Optimus /...
asked by 18.12.2014 / 17:34
2
answers

Json API access problem with React

I'm trying to access the following Json variable in an API: page[0].infoBloco[0].tabela[0].dados[0].fonte.nome I'm getting the error: TypeError: this.state.page[0] is undefined[Learn More] index.jsx:49 The Json API returns: [ {...
asked by 19.06.2018 / 15:36
1
answer

Await ignored in asynchronous method c #

I need to use the return of an asynchronous method for validation but even with the use of "await" the method is still running before I get the function return. var teste = await new VendaService().EnviarVendaParaServicoCentral(new List<...
asked by 22.09.2015 / 19:15
1
answer

Asynchronous server responses, for AJAX route calls

I have an application that at the end of loading a page I make an AJAX request that takes about 20 seconds. After this request my page continues to function normally so when I try to make another AJAX request it waits for the first one to ret...
asked by 27.08.2014 / 18:55
3
answers

How to update TextView from AsyncTask?

I have seen in this example, updating the TextView field from within AsyncTask but I can not repeat that in my code, and what do you think this is not even possible or is it? protected String doInBackground(String... params) {...
asked by 26.03.2014 / 17:24
1
answer

What is the difference between Task and async Task?

In the code below I wrote two methods, one with Task return and another async Task . What happens differently in the execution of these methods since for one I added in the construction the reserved word await and in the othe...
asked by 09.08.2018 / 16:53
1
answer

Run fast things synchronously and things delayed asynchronously?

Generally, in .NET, I run time-consuming things asynchronously so I do not catch the visual thread . In a simple example, if I have a loading in the UI, in case slow things run without awaited , they catch that loading , which was execute...
asked by 18.02.2017 / 11:41
2
answers

Creating an array of type double (not a multidimensional array)

I need to pass two values of type double to a AsyncTask in my application. I tried to define an array using the following code: double latitude = location.getLatitude(); double longitude = location.getLongitude(); double[] coord...
asked by 23.06.2014 / 21:26
1
answer

Windows service using async method, is there any need?

On my system, I have some auxiliary routines, which are triggered at set times, out of work. These routines are run by a Windows service program. Would you need to run these asynchronous services? That is, using methods async ? As...
asked by 22.07.2017 / 15:52
3
answers

What is the difference between SmtpClient.SendAsync and SmtpClient.Send () using Thread?

What is the difference between using SmtpClient.SendAsync() and creating threads and running SmtpClient.Send() for sending messages? Is there a lot of difference in performance or resource consumption?     
asked by 05.10.2016 / 15:07