(Task) Task (2016)

<< (back to Task) My multithreading learning conspectus << (back to QuickHelp)



1. APM (Asynchronous Programming Model).

Working since NET 1.1 and currently not implemented in .NET CORE, run synchronously.

Contains BeginRead/EndRead, IsyncResult interface, State object with IsComplete flag.

Common scheme:


    Dim RequestState As New With { ...}
    Sub Task()
        Dim Request As Net.HttpWebRequest = Net.HttpWebRequest.Create("")
        Dim Res As IAsyncResult = CType(Request.BeginGetResponse(New AsyncCallback(AddressOf RespCallback), RequestState), IAsyncResult)
    End Sub
    Sub RespCallback(ByVal ar As IAsyncResult)
    End Sub

Examples on my site.


Full documentation. Asynchronous Programming Model.pdf

2. EAP (Event-based Asynchronous Pattern).

Require method with ___Async suffix, require Event and EventHandler and EventArgs as derived type. You can provide own private delegate, own derived handler from EventHandler, and can provide own StateObject, own Cancel method. Support IProgress and ReadComplete event.


    Async Function ExecuteAsync(ByVal SshCommand As SshCommand, ByVal OutputLine As IProgress(Of SshOutputLine), ByVal CTX As CancellationToken) As Task

Examples on my site.


Full documentation. Event-based Asynchronous Pattern.pdf

3. TAP (Task-based Asynchronous Pattern).

Future.


    Await ReadAsync(Nothing, Nothing, Nothing)
    Async Function ReadAsync(Buf, offset, count) As Task(Of Int16)
    End Function

Examples on my site.


Full documentation.

4. Ms documentation about Task and Thread.



5. Threading and Task synchronization.


Future.


Full documentation.

6. BackgroundWorker.

Examples on my site.


Full documentation. Event-based Asynchronous Pattern.pdf

7. Parallel library.

Examples on my site.


Full documentation. Parallel Programming.pdf

8. Reactive NET extension.

Examples on my site.

9. MultiThreading in NET Core 6.

Future.

10. Delegate Task vs Promise Task (.NET).



11. .NET Promise task is the same than Promise in JS.



12. Delegate Task vs Promise Task Article.Read more about difference...

Article contains description of:

In the TPL world the various Delegate Tasks are divided up among different threads, which then actually execute the code in those Delegate Tasks. Read more

In the async world, most tasks are Promise Tasks. When code does an await on a Promise Task, there is no thread tied up waiting for that task to complete. read more No thread mean there is only kernel callback.

How to correct select type of multiThreading.

12. Task Yield.



14. Other point of view read more ....



Comments ( )
<00>  <01>  <02>  <03>  <04>  <05>  <06>  <07>  <08>  <09>  <10>  <11>  <12>  <13>  <14>  <15>  <16>  <17>  <18>  <19>  <20>  <21>  <22>  <23
Link to this page: http://www.vb-net.com/QuickHelp/Task/Index.htm
<SITEMAP>  <MVC>  <ASP>  <NET>  <DATA>  <KIOSK>  <FLEX>  <SQL>  <NOTES>  <LINUX>  <MONO>  <FREEWARE>  <DOCS>  <ENG>  <CHAT ME>  <ABOUT ME>  < THANKS ME>