DEV Community

Discussion on: Awaitable/awaiter pattern and logical micro-threading in C#

Collapse
 
panoukos41 profile image
Panos Athanasiou

Awesome post!

I will have to read that last example more times to get it but just the thing about GetAwaiter and GetEnumerator is great. I remember videos stating you don't really need the interface but it never crossed my mind to use it from extension methods, thanks :O :D

Collapse
 
nikiforovall profile image
Oleksii Nikiforov

Thanks!

Yes, I imagine it could be used in a really creative way. 🙂

Collapse
 
craigajohnson profile image
Craig Johnson

Fantastic post full of great ideas!

I wrote a GetEnumerator for Range just recently and now I apply it to all sorts of things in like if ((1..5).RandomElement() <= 3)

Love the TaskAwaiter on IEnumerable and IEnumerable - totally added that now and attributed to you.

Thread Thread
 
nikiforovall profile image
Oleksii Nikiforov

Love it! 💪