The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

460839 (2) [Avatar] Offline
#1
Hello, reading chapter 5 (really difficult because there is a lot of notion hidden (concurrency, asynchonous, thread (logical and hardware), process, multithreading, multitasking, parallels, process...)).


I'm not sure I understand this part well :

5.8 Custom task types in C# 7
...
As a reminder, the async/await feature has always allowed us to await custom types that follow the awaitable pattern. The new feature here permits writing an async method that returns a custom type.



It makes no sense, for me. Did you mean value type ? Or Did you mean a custom type witch not follow the awaitable pattern (though you say few lines after "Obviously a custom task type has to implement the awaitable pattern, but there’s much more to it than that") ?
jon.skeet (483) [Avatar] Offline
#2
> Did you mean value type ?

No, I meant a custom type instead of Task or Task<T>. The custom type still has to implement the awaitable pattern, but there can be types other than Task that do that - such as ValueTask<T>.
460839 (2) [Avatar] Offline
#3
Ok, I got it.

Thank you.