Browse by Tags

All Tags » C# 5 » async (RSS)

The importance of context, and a question of explicitness

(Just to be clear: I hate the word "explicitness". It reminds me of Rowan Atkinson as Marcus Browning MP , saying we should be purposelessnessless. But I can't think of anything better here.) For the last few days, I've been thinking...
Posted by skeet | 12 comment(s)
Filed under: , ,

Multiple exceptions yet again... this time with a resolution

I've had a wonderful day with Mads Torgersen, and amongst other things, we discussed multiple exceptions and the way that the default awaiter for Task<T> handles an AggregateException by taking the first exception and discarding the rest. I...
Posted by skeet | 5 comment(s)
Filed under: , ,

Propagating multiple async exceptions (or not)

In an earlier post , I mentioned  that in the CTP, an asynchronous method will throw away anything other than the first exception in an AggregateException thrown by one of the tasks it's waiting for. Reading the TAP documentation, it seems this...
Posted by skeet | 2 comment(s)
Filed under: , ,

Configuring waiting

One of the great things about working at Google is that almost all of my colleagues are smarter than me. True, they don't generally know as much about C#, but they know about language design, and they sure as heck know about distributed/parallel/async...
Posted by skeet | 14 comment(s)
Filed under: , ,

Dreaming of multiple tasks again... with occasional exceptions

Yesterday I wrote about waiting for multiple tasks to complete . We had three asynchronous tasks running in parallel, fetching a user's settings, reputation and recent activity. Broadly speaking, there were two approaches. First we could use TaskEx...
Posted by skeet | 7 comment(s)
Filed under: , ,

Control flow redux: exceptions in asynchronous code

Warning: as ever, this is only the result of reading the spec and experimentation. I may well have misinterpreted everything. Eric Lippert has said that he'll blog about exceptions soon, but I wanted to put down my thoughts first, partly to see the...
Posted by skeet | 3 comment(s)
Filed under: , ,

Dreaming of multiple tasks

I apologise in advance if this post ends up slightly rambly. Unlike the previous entries, this only partly deals with existing features. Instead, it considers how we might like to handle some situations, and where the language and type system thwarts...
Posted by skeet | 25 comment(s)
Filed under: , ,

C# 5 async: experimenting with member resolution (GetAwaiter, BeginAwait, EndAwait)

Some of you may remember the bizarre query expressions I've come up with before now. These rely on LINQ finding the members it needs (Select, Where, SelectMany etc) statically but without relying on any particular interface. I was pleased to see that...
Posted by skeet | 11 comment(s)
Filed under: , ,

C# 5 async: investigating control flow

Yes, this has been a busy few days for blog posts. One of the comments on my previous blog post suggested there may be some confusion over how the control flow works with async. It's always very possible that I'm the one who's confused, so...
Posted by skeet | 21 comment(s)
Filed under: , ,

C# 5 async and choosing terminology: why I'm against "yield"

Eric Lippert's latest (at the time of this writing) blog post asks for suggestions for alternatives to the new "await" keyword, which has inappropriate connotations that confuse people. In particular, it sounds like the thread is going to...
Posted by skeet | 39 comment(s)
Filed under: , ,

Initial thoughts on C# 5's async support

As many of you will have seen yesterday, the major new feature of C# 5 was announced yesterday: support for asynchronous operations with new contextual keywords of "async" and "await". I haven't had a lot of time to play with them...
Posted by skeet | 26 comment(s)
Filed under: , ,
More Posts « Previous page