Showing tag results for .NET 4

Oct 27, 2009
Post comments count0
Post likes count0

What’s new in Beta 2 for the Task Parallel Library? (Part 2/3)

Danny Shih

Related posts: Last week, we talked about how TPL adopted a new, better cancellation model.  Today, we’ll cover a change that makes Tasks Detached by Default, some ContinueWhenAll/Any Refactoring, and the handy UnobservedTaskException event.Tasks are Detached by DefaultIn Beta 2, we have changed an important default.  Tasks are now...

.NET Parallel Programming
Oct 19, 2009
Post comments count0
Post likes count0

What’s new in Beta 2 for the Task Parallel Library? (Part 1/3)

Danny Shih

Related posts: Visual Studio 2010 and .NET 4 Beta 2 is here!  In terms of completeness and readiness for production coding, Beta 2 promises to be much better than Beta 1, and TPL is one component that delivers significant improvements over what was previously available.  To get you excited about it, this series of posts details...

.NET Parallel Programming
Oct 19, 2009
Post comments count0
Post likes count0

.NET 4 Beta 2 is here!

Stephen Toub - MSFT

The .NET Framework 4 Beta 2 is now available! MSDN Subscribers can download it today, and it will be generally available for download on Wednesday.  More information is available at https://msdn.microsoft.com/en-us/vstudio/dd582936.aspx.  Additionally, one of the really exciting things about this Beta release is that it’s “go-...

.NET Parallel Programming
Oct 16, 2009
Post comments count0
Post likes count0

Parallel Computing Presentations in Michigan, Ohio, Kentucky, and Tennessee

Stephen Toub - MSFT

In a week, I’m going to be traveling through Michigan, Ohio, Kentucky, and Tennessee, speaking about parallel computing, Visual Studio 2010, and .NET 4, primarily at corporations during the day and at user groups in the evenings.If you’re in the area and interested, please do attend, and I look forward to meeting you!  A list of ev...

.NET Parallel Programming
Oct 12, 2009
Post comments count0
Post likes count0

Parallelized Map and Filter Operations

Stephen Toub - MSFT

Common operations like map and filter are available in parallelized form through PLINQ, though the names differ.  A map can be achieved with PLINQ’s Select operator, and a filter with PLINQ’s Where operator.For example, I could implement a ParallelMap operation that takes in one array and returns another as follows: public static...

.NET Parallel Programming
Sep 22, 2009
Post comments count0
Post likes count1

TaskScheduler.FromCurrentSynchronizationContext

Stephen Toub - MSFT

The Task abstractions in .NET 4 run on instances of the TaskScheduler class.  Two implementations of TaskScheduler ship as part of the .NET Framework 4.  The first is the default scheduler, which is integrated with the .NET 4 ThreadPool and takes advantage of its work-stealing queues.  The second is the type of TaskScheduler returned...

.NET Parallel Programming
Aug 30, 2009
Post comments count0
Post likes count1

The meaning of TaskStatus

Stephen Toub - MSFT

Every System.Threading.Tasks.Task instance goes through a lifecycle, and it only makes this journey once.  To provide insight into where in that lifecycle a given Task is, the Task class provides an instance Status property.  That property returns a value from the TaskStatus enumeration that reflects the current point in the lifecycle.&ld...

.NET Parallel Programming
Aug 4, 2009
Post comments count0
Post likes count0

Parallel Extensions and I/O

Danny Shih

In this post, we’ll investigate some ways that Parallel Extensions can be used to introduce parallelism and asynchrony to I/O scenarios. Here’s a simple scenario.  I want to retrieve data from a number of web resources. static string[] Resources = new string[] {     "http://www.microsoft.com", "http://www.msdn.com",   ...

.NET Parallel Programming
Jul 7, 2009
Post comments count0
Post likes count0

TaskCreationOptions.PreferFairness

Stephen Toub - MSFT

One of the ways in which the Task Parallel Library achieves good performance is through “work-stealing”.  Work-stealing is supported in the .NET 4 ThreadPool for access through the Task Parallel Library and its default scheduler.  This manifests as every thread in the ThreadPool having its own queue for work; when that thread ...

.NET Parallel Programming
Jun 30, 2009
Post comments count0
Post likes count0

Asynchronous methods, C# iterators, and Tasks

Stephen Toub - MSFT

More and more, developers are realizing the significant scalability advantages that asynchronous programming can provide, especially as it relates to I/O. Consider an application that needs to copy data from one stream to another stream, such as is being done in the following synchronous implementation: static void CopyStreamToStream(Stream input...

.NET Parallel Programming