Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
More VFP nostalgia : wait nowait
Message
De
10/10/2011 11:55:38
 
 
À
10/10/2011 11:35:33
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 8.0
OS:
Vista
Network:
Windows XP
Database:
Jet/Access Engine
Application:
Desktop
Divers
Thread ID:
01525944
Message ID:
01525983
Vues:
57
I didn't say it blocked the current thread (which would be the UI thread if that's where it was implemented) - if it did then it would be completely pointless. But AFAICS, depending on what's happening in the UI, the processing time for the method will be impacted to a greater extent than if it ran on a separate thread.

I suppose this:
"Async methods are intended to be non-blocking operations. An await expression in an async method does not block the current thread while the awaited task is running. Instead, the expression signs up the rest of the method as a continuation and returns control to the caller of the async method.
Async methods do not require multithreading because an async method does not run on its own thread. It works on the current thread, using time on the thread only when it is active."

from http://msdn.microsoft.com/en-us/library/hh191443(v=vs.110).aspx sums is up for me. But I still don't see how one would report progress. I suppose that if it is on the same thread as the UI then actually updating it is simple - but I don't see where one has the opportunity to do so....multiple awaits ?


>Asynch was designed specifically to handle the problem of UI locking. At least that's what I heard from Mads and Anders.
>
>>I've got the CTP but I'm not sure that it is (or would be) the best approach in this situation since, unless I've missed something, there's no way to communicate progress. Also the async method doesn't actually run in another thread so in some ways would be less efficient.....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform