Showing archive results for 2009

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
Jul 5, 2009
Post comments count0
Post likes count0

Processing Streams with PLINQ

Igor Ostrovsky - MSFT

In many data-parallel scenarios, all of the data to be processed is available immediately. This blog post addresses the opposite scenario: the inputs arrive gradually (as if in a stream), and we want to start producing results even before reading the last element of the input sequence. There is a variety of scenarios in which inputs become ava...

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

VS2010 Beta1 "Delete existing objects before creating" flag for DB Deployment

Web Development Tools Microsoft

  Here is an example of end to end scenario of the last blog VS2010 Beta1 Web Application Project Database package and SMO options. Here, we’re going to package a web application and its database with “Delete existing objects before creating” flag, so that we can test the deploy multiple times without the need to drop the database each time a...

ASP.NET
Jul 1, 2009
Post comments count0
Post likes count0

CLR Inside Out – Building Tuple

CLR Team

The new installment of the “CLR Inside Out” column in MSDN magazine is now available on line.  This month we have an article from Matt Ellis on Building Tuple.  It provides one example of how a new type makes it into the base class libraries. You can find a list of all “CLR Inside Out” articles here.  As ...

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

Check out the following on our Tips and Tricks Blog

Web Development Tools Microsoft

Tip#66: Did you know... how to insert quotes values automatically while typing the attrib values?Tip #67: Did you know the list of ASP.Net MVC shortcuts?Tip #68 Did you know… How simple it is to attach an existing style sheet to your web page?Tip #69: Did you know…The keyboard shortcut for View in Browser?Tip #70: Did you know&hell...

ASP.NET
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
Jun 29, 2009
Post comments count0
Post likes count0

VS2010 Beta1 Web Application Project Database package and SMO options

Web Development Tools Microsoft

In Visual Studio 2010 Beta1 release, SQL server database schema and data can be packaged for deployment along with the website.  It utilizes Msdeploy SQL Database provider functionality in IIS team’s msdeploy release.  In Visual studio 2010 Beta1, user can set the database package options in web application project’s Deploy-SQL property...

ASP.NET
Jun 24, 2009
Post comments count0
Post likes count0

Don’t dispose of objects that you don’t own

phillips.joshua

In concurrent programs, race conditions are a fact of life but they aren’t all bad.  Sometimes, race conditions are benign, as is often the case with lazy initialization.  The problem with racing to set a value, however, is that it can result in multiple objects being instantiated when only one is needed.  Take the LazyInitializer ...

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

Parallel For Loops over Non-Integral Types

Stephen Toub - MSFT

In a previous post, it was demonstrated how for loops with very small loop bodies could be parallelized by creating an iterator over ranges, and then using Parallel.ForEach over those ranges.  A similar technique can be used to write parallel loops over iteration spaces of non-integers.  For example, let’s say I wanted to paralleliz...

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

Enabling CAS Policy Compatibility Mode for a Project

CLR Team

If you’re migrating a VS project over to VS 2010 Beta1 and you are calling code that is passing Evidence objects to the runtime expecting security policy resolution, or if you’re using a permission Deny, you may run into the following exception: NotSupportedException: This method uses CAS policy, which has been obsoleted by the .NET Framework. In o...

.NET