3 ms·
C# 5 also has this, with the async/await keywords. The nice thing is that it works with older plain Task-based code (which was callback spaghetti).
by cmircea 13y ago
C# 5 also has this, with the async/await keywords. The nice thing is that it works with older plain Task-based code (which was callback spaghetti).
- bigdubs 13y agoTasks are still OS threads, though they get lumped into a threadpool so a lot of the overhead is mitigated (in most cases).
- balakk 13y agoThe async/await model does not create new threads. http://msdn.microsoft.com/en-us/library/vstudio/hh191443.aspx http://msdn.microsoft.com/en-us/library/vstudio/hh191443.asp... TPL(Task parallel library) does use additional threads, and that's a different programming model. The async/await model in C# is essentially from F#'s async workflows: http://msdn.microsoft.com/en-us/library/dd233250.aspx http://msdn.microsoft.com/en-us/library/dd233250.aspx