Browse by Tags
All Tags »
Threading (RSS)
Thread local storage is another method of synchronization between threads. It is different that most synchronization cases because instead of sharing state between threads it enables developers to have independent, thread specific pieces of data which
Read More...
I've been busy lately and neglected my series on Active Objects . It's been a fairly busy time for me both in and out of work. Enough excuses, back to the fun. With the basic PipeSingleReader class, we now have the last piece necessary to
Read More...
Previously we discussed a multi-thread safe queue like data structure using locks as an internal synchronization mechanism. This time we'll look at a version requiring no locks. In the previous version, locks were used to synchronize access to an underlying
Read More...
Before we can get to building an Active Object implementation, there are some more primitive structures we need to define. Active Objects live on a separate thread where every call is executed in a serialized fashion on that thread. The next primitive
Read More...
It's often useful to ensure that actions occur on specific threads, in particular event handlers. Take Windows Forms for instance where all operations on a Control must occur on the thread it was created on. Typically this is not a problem
Read More...
Part of creating a multithreading program is understanding which threads objects live on. Seems simple enough and typically is. However it's nice to insert guarantees to match the design. One type of threading model is for objects or subsets
Read More...
In addition to Future<T> there is also the concept of Futures that don't return any values. Instead the perform the operation and return. Because there is no additional data to pass between the threads building an Empty Future is fairly
Read More...
The last post dealt with building the base Future class. Now we'll build the child class used to run Func<TResult> 's. The basic implementation is straight forward. The class will run a delegate typed to Func<TResult> in
Read More...
In the end there are two basic types of Future implementations you can use. Futures which return no values Futures which return a value The rest of the behavior and shape of the Future is the same and screams for a pattern of sorts. I've found the
Read More...
If you read Jon Skeet's blog you'll notice he's been playing around lately with "push" style enumerators. Push enumerators are the concept of "we'll tell you when we're ready". This is different from IEnumerator<T> which is more of a pull; "ask
Read More...
Future's are a great abstraction for asynchronous programming. One of the items making them so good is the easy manner in which you can declare one and wait for it to finish. The idea is to allow for many futures to be declared with as little overhead
Read More...
Herb Sutter gave one of my favorite and inspiring presentations. It is called "The Free Lunch is Over". The original article can be found here . My first encounter though came from his PDC presentation and highly recommend
Read More...
Part 6 left us with comparable tuples. At this point, the Tuple class is functionally complete. There will be a little more done with the debugability and overall fit into larger projects. But otherwise it is sound. Now the focus
Read More...
Internally and externally I see a lot of questions about the .Net Memory Model. I think a lot of the confusion comes from the specs. Mainly that there are really two of them. The first is the ECMA CLI Memory Model (Partition 1, Section 12). This standard
Read More...
ISynchronizeInvoke is an interface which allows you to execute a delegate synchronously or asynchronously. The implementer of the interface can control how the delegate is executed. In particular the implementer controls on which thread the delegate is
Read More...