Welcome to Sol 3 Sign in | Join | Help

ASPInsiders

Aggregation of ASPInsiders and Microsoft ASP.NET team member blogs.

Browse by Tags

All Tags » Multithreading   (RSS)
Transforming loops in methods which invoke delegates
In a previous post , we’ve started talking about data parallelism. Before getting started with the “real stuff”, I thought it would be a good idea to write a small post that explains how to break our loops into units of work. For instance, consider the Read More...
Improving performance with data parallelism
I know that it’s been a long time since I’ve written on multithreading (I’ve been really busy in JavaScript land!), but that is still an area which interests me and that’s why I’ll be writing on it from time to time. As we’ve seen along this series , Read More...
Multithreading: using VolatileXXX instead of the volatile keyword
In the previous post we’ve seen how we can use the C# volatile keyword to guarantee that those nasty load-load reordering stay away from our code. As I’ve said before, we can also use the static Thread.VolatileRead or Thread.VolatileWrite for having more Read More...
Multithreading: the volatile keyword – part II
In the last post , I’ve showed you some code I’ve written in  the past and asked if there was anything wrong with it. Here’s the code again: class Lazy { private SomeObject _object; private Object _locker = new Object (); public SomeObject SomeObject Read More...
Multithreading: using the volatile in your C# code
Today we’re only going to talk about the volatile keyword. The volatile keyword can be used on the declaration of a field, transforming it into a volatile field. Currently, you can only annotate a field with this keyword if it is: a reference type; a Read More...
Multithreading: a final example on how CompareExchange might help you
In the last posts we’ve been poking around memory models, memory fences and other interesting things that might lead to the so called lock free programming. Before keep looking at how we can use those features from our C# code, I’d like to add one more Read More...
Multithreading: using fences from .NET code
In the last post , we’ve talked about memory fences. Today we’re going to keep looking at this topic, but we’re turning our attention to coding, ie, we’re going to talk about the options we have to add fences to our classes. In .NET, things are relatively Read More...
Multithreading: introducing memory fences
A few posts back, we’ve introduced the concept of load and store reordering. As we’ve seen, reordering operations exist as a way of improving performance and can be introduced on several levels (starting at compilation time and ending at runtime when Read More...
Multithreading: when interlocked operations aren’t enough
In the previous post , we’ve started looking at interlocked operations. As we’ve seen, interlocked operations are great at what they do but they won’t be usable in all scenarios (ie, don’t think that they’ll solve all your locks problems). To show how Read More...
Multithreading: introducing the interlocked operations
As we’ve seen in the previous post , most processors give us important insurances regarding memory loads and stores. However, even though those insurances are important and can be used in several scenarios, the truth is that they aren’t enough for all Read More...
Multithreading: hardware atomicity
In the previous post , we’ve started looking at memory loads and stores reordering. In this post, we’re going to keep our study and we’re going to introduce atomicity. Atomicity is a really important concept we’ve met in the past. We’ve already talked Read More...
Multithreading: load and store reordering
Until now, we’ve been busy talking a look at several interesting topics associated with multithreading programming. As we’ve seen, one of the most problematic areas in multithreaded programs is sharing state across multiple threads. As we’ve seen in several Read More...
Multithreading: the BackgroundWorker class
In the last posts of the series, we’ve been looking at many important features related to GUIs and multithreading. Today, we’re going to wrap up this topic with the BackgroundWorker class. The previous posts are really targeted at library developers. Read More...
Multithreading: AsyncOperationManager and AsyncOperation helpers
In the last posts , we’ve taken a look at how synchronization contexts help marshal work across threads. Today we’re going to talk about two classes (which we’ve already met in the past when we implemented the EAP) that abstract even further the use of Read More...
Multithreading: windows forms and synchronization contexts
In the previous post , we’ve started looking at synchronization contexts. In this post, we’ll take a close look at the widows forms custom synchronization context. Whenever you run a windows form app, you might end up interacting with the WindowsFormsSynchronizationContext Read More...
More Posts Next page »