Await async
No edit summary
No edit summary
Line 1: Line 1:
<message>Write the content here to display this box</message>
<message>Write the content here to display this box</message>In C#, you have the async await pattern which sections your code on compiler level and chunks it up in the dispatcher queue in order to avoid user input blocking/freezing.
 
In C#, you have the async await pattern which sections your code on compiler level and chunks it up in the dispatcher queue in order to avoid user input blocking/freezing.


Depending on what you want to do:
Depending on what you want to do:
Line 7: Line 5:
* Just adapt to an existing api that uses async?: Call it as a normal function and append with GetResult()
* Just adapt to an existing api that uses async?: Call it as a normal function and append with GetResult()
* Avoid UI blocking in Turnkey? In Turnkey, this does not apply since UI interaction is in browser.
* Avoid UI blocking in Turnkey? In Turnkey, this does not apply since UI interaction is in browser.
* Avoid UI blocking in MDriven generic code? See: [[Training:IAsyncSupportService|IAsyncSupportService - MDrivenWiki]]
* Avoid UI blocking in MDriven generic code? '''See:''' [[Documentation:IAsyncSupportService|IAsyncSupportService - MDrivenWiki]]
[[Category:Advanced]]
[[Category:UI]]
[[Category:MDriven Turnkey]]

Revision as of 05:00, 5 March 2025

This page was created by Hans.karlsen@mdriven.net on 2024-05-21. Last edited by Stephanie@mdriven.net on 2025-03-05.

In C#, you have the async await pattern which sections your code on compiler level and chunks it up in the dispatcher queue in order to avoid user input blocking/freezing.

Depending on what you want to do:

  • Just adapt to an existing api that uses async?: Call it as a normal function and append with GetResult()
  • Avoid UI blocking in Turnkey? In Turnkey, this does not apply since UI interaction is in browser.
  • Avoid UI blocking in MDriven generic code? See: IAsyncSupportService - MDrivenWiki