Showing 71 - 80 of 227 results for “stephen toub”

When at last you await

When you start using async methods heavily, you’ll likely see a particular pattern of composition pop up from time to time.  Its structure is typically either of the form: async Task FooAsync() {     … // some initialization code without awaits      await BarAsync(&hellip...


Awaiting Socket Operations

The System.Net.Sockets.Socket class in .NET exposes multiple sets of asynchronous methods that perform the same basic operations but that are exposed with different patterns.The first set follows the APM pattern, where for a synchronous method like Receive, the BeginReceive and EndReceive methods are exposed.  If you want to be able to &...


Keeping Async Methods Alive

Consider a type that will print out a message when it’s finalized, and that has a Dispose method which will suppress finalization: class DisplayOnFinalize : IDisposable {     public void Dispose() { GC.SuppressFinalize(this); }     ~DisplayOnFinalize() { Console.WriteLine(“Finalized”); } } Now ...


Updated TPL Dataflow CTP

It’s been a few months since April when we last released a Community Technology Preview (CTP) of System.Threading.Tasks.Dataflow.dll, aka “TPL Dataflow”.  Today for your programming pleasure, we have another update.As mentioned in “What’s New for Parallelism in .NET 4.5”, System.Threading.Tasks.Dataflow...


Task.Run vs Task.Factory.StartNew

In .NET 4, Task.Factory.StartNew was the primary method for scheduling a new task.  Many overloads provided for a highly configurable mechanism, enabling setting options, passing in arbitrary state, enabling cancellation, and even controlling scheduling behaviors.  The flip side of all of this power is complexity.  You need to ...


Parallelism BUILD talks available on Channel9

Thanks to everyone who attended my two talks at BUILD this past week, and I hope you enjoyed the sessions!  For those of you unable to attend in person, the recordings of the talks are now available on Channel9: There were hundreds of other sessions this week at BUILD, and you can find their videos here: https://channel9.msdn.com/...