Questions tagged as 'assincronismo'

1
answer

Asynchronous module or handler completed while asynchronous operation was pending

I'm trying to send an email asynchronously, without having to wait for the return. But when I do not use await I get an exception on return to action . Code:publicTaskMissaoAvaliada(stringusuario,stringdestinatario){_email.From=new...
asked by 30.08.2017 / 02:58
2
answers

TaskCompletionSourceTResult without a type parameter

The TaskCompletionSource<TResult> class needs a TResult type. That way, when I need to use this class without having a return type ( void ), I have to do something like: var tcs = new TaskCompletionSource<object>(); /...
asked by 08.11.2017 / 03:20
1
answer

How to avoid request blocking?

I'm doing a project in ASP.NET MVC + IIS and I realized that when I made a request to a page with a long read in the database Entity Framework ), if I open another window and try to access another page of the site (the Home for example, wh...
asked by 21.04.2017 / 17:36
1
answer

How do I know if the customer sent me something?

I made this code here following some tutorials on the internet. buttonAbrirConexão.Enabled = false; TcpListener servidor = new TcpListener(6554); servidor.Start(); while(true) { Thread.Sleep(2500); if(servidor.Pending()) { Mess...
asked by 28.08.2016 / 02:39
1
answer

Error attempting asynchronous connection

I am trying to do this in order not to crash the application while waiting for the server to accept the connection. I saw what you can do with async and await . But when trying to use them to wait for the connection without crashing...
asked by 09.10.2017 / 04:42
1
answer

Dealing with synchronous and asynchronous request results

I have a function that triggers an ajax request for a route, see: var getInstituicoesSemUsuario = function(tipo) { var resultado = ""; $.ajax( { url: "{{path_for('instituicao.sem.responsavel')}}",...
asked by 12.08.2017 / 17:35
1
answer

Unexpected behavior in asynchronous javascript

I am writing a backend code using javascript, node and the npm modules 'mysql' and 'request'. I tried to write a module to do a pooling of SQL database connections by different API calls in various files of my project. My module mysqlLib.js: v...
asked by 31.03.2017 / 04:48
2
answers

Array returning Undefined because of asynchronism

I'm accessing the Trello API , but I came across the following problem: Access the Trello information, obtaining the id of each existing queue, the code is as follows: var x; var numberCardsByList = []; trello.get("/1/boards/[idBoard]/l...
asked by 23.05.2016 / 14:31
1
answer

Inserting, editing, removing and displaying data Asynchronously

I have a CRUD in PHP developed with the MVC standard, all the interaction with the database is done with PDO, my challenge is, to pass all the data requests asynchronously using Ajax and Json. I have only theoretical knowledge about asynchronous...
asked by 09.12.2017 / 17:52
1
answer

Transform Synchronous Method to Asynchronous

I have the following method: public string MyMethod1(string myParam1) { // Implementação return myReturnValue; } I needed to create an asynchronous method that did the same thing, to process multiple items in a list at the same time...
asked by 25.07.2017 / 15:20