Questions tagged as 'assincronismo'

1
answer

WebWorker and Async - What's the difference and when to use it?

I'm specifically studying a WebWorker implementation, and I did not quite understand the difference between WebWorker and Async in JavaScript, whereas WebWorker gives me an asynchronous solution with a better (or better) code organization....
asked by 27.04.2017 / 16:08
1
answer

Why can not we use Await within a Catch, Finally and Synclock in VB?

Why can not we use the Await operator within the statements Catch , Finally and Synclock in VB? The C # 6.0 has support for using Await within Catch / Finally .     
asked by 01.01.2017 / 13:43
1
answer

How to create an asynchronous method that is cancelable?

How to create an asynchronous method that is cancelable? In this context, the DoFoo() method does things that can not be simply stopped, such as reading and writing files, and by canceling, I have to wait for these I / O operations to...
asked by 28.07.2017 / 15:41
1
answer

Scope in asynchronous call (Javascript)

Let's suppose I had the following method: this.loadCustomers = function(){ Request.get("php/loadCustomersAction.php", (function(error, data){ if(!error) this.setCustomers(data); }).bind(this)); }; where "Request....
asked by 14.06.2017 / 19:14
1
answer

Why can not I capture exceptions triggered by async void?

Why can not I catch exceptions triggered by asynchronous methods that do not return Task ? public async void calcularPrecos() { var tabelaPreco = await getTabelaPreco(); /* Blá, blá, blá... */ } public void iniciarCalculos() {...
asked by 25.08.2016 / 04:12
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
1
answer

How to call asynchronous method in class constructor?

How do I call a method marked as async in a class constructor?     
asked by 22.10.2017 / 14:01
3
answers

javascript function 1 expect return from function 2 (sync await promise.all)

Hello! I have a very big question regarding the use of sync / await and tbm of Promise.all. I have the following code: class Conexao { constructor(loading) { this.loading = loading; } acessar(rota) { return this.requisicao(rota, 1);...
asked by 18.05.2018 / 16:34
2
answers

Do an asynchronous function wait for another

I'm developing a JavaScript system with Node.JS and Redis, however, because of the asynchronous functions, the loop terminates before the functions, which causes the wrong response array or the timeout on the server. In the face of my problem, i...
asked by 11.01.2016 / 20:15
1
answer

AsParallel () .ForAll vs async await

When using AsParallel().ForAll , and when to use async await ? I'm providing an example with a download routine and a file manipulation routine. AsParallel().ForAll performs better in parallel download operation. as...
asked by 14.11.2018 / 17:59