c# - Is there a System.Threading.SynchronizationContext.Current.PostAsync()? -


I can back anything back to the UI thread like this:

  // When I'm on UI Thread var _UI = System threading. Synchronization Consort Present; // Then a background thread _UI.Post ((x) => gt; {DoSomething ();}, tap); However, if I am going to create  asynchrnous  on that background thread, calling _UI.Post () will undo my efforts and  Makes UI wait for the doSomething () execution   

Of course _UI.PostAsync () is a pseudo code but is a method of executing on the UI thread, but an asynchronous method From ? Fundamentally, I know that I am exposing my lack of knowledge and understanding. Kindly be kind, I'm just asking;)

will not block the background thread, because it is asynchronous By the form "Post" is the UI Thread (in this case).

The UI thread will only be blocked for the duration of the call DoSomething () - but in this situation, you are saying it should run on the UI thread In that case, it will tie a UI thread.

The most work here is to be placed on the background thread, and only to call .ost (...) which directly sets the user interface such as, They should be very fast, and should block (noticably) the UI anytime.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -