Skip to content

Comment on Porting dl.google.com from C++ to Goparent

Comments

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).

Tasks are still OS threads, though they get lumped into a threadpool so a lot of the overhead is mitigated (in most cases).

The async/await model does not create new threads.

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

I realize that, what I was referring to was the old model (TPL), which wasn't terrible to begin with.

The "new" model is just syntactic sugar over the "old" TPL, so you're wrong anyway ;-)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.