Welcome to MSDN Blogs Sign in | Join | Help

jaredpar's WebLog

Code, rants and ramblings of a programmer.

Syndication

News

Now Reading

Expert F#

What's a better book to read when learning F#?

Essential WPF

Thus far the best book I've read on WPF. Gets right down to working with WPF and the goals/history.

Purely Functional Data Structures

Reading this book makes me feel like I'm back in college. It will really get your mind going and is best read with a whiteboard handy.


Browse by Tags

All Tags » Threading   (RSS)
Thread Local Storage template
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...

Posted Monday, April 21, 2008 1:52 PM by Jared Parsons | 1 Comments

Filed under: , ,

ActiveObject
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...

Posted Sunday, March 30, 2008 12:39 PM by Jared Parsons | 0 Comments

Filed under: , ,

PipeSingleReaderNoLock
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...

Posted Monday, March 03, 2008 12:46 AM by Jared Parsons | 0 Comments

Filed under: , ,

PipeSingleReader
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...

Posted Sunday, March 02, 2008 12:53 PM by Jared Parsons | 6 Comments

Filed under: , ,

SynchronizationContext and Higher Order Functions
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...

Posted Sunday, February 24, 2008 4:42 AM by Jared Parsons | 1 Comments

Thread Affinity
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...

Posted Friday, February 22, 2008 8:55 PM by Jared Parsons | 1 Comments

Filed under: ,

Building a Future which returns no Value
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...

Posted Monday, February 18, 2008 4:15 PM by Jared Parsons | 1 Comments

Filed under: , , ,

Building Future<T>
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...

Posted Wednesday, February 13, 2008 10:16 AM by Jared Parsons | 4 Comments

Filed under: , ,

Building the Base Future
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...

Posted Tuesday, February 12, 2008 10:48 AM by Jared Parsons | 5 Comments

Filed under: , ,

Push Enumerators
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...

Posted Tuesday, February 05, 2008 12:26 PM by Jared Parsons | 1 Comments

Filed under: , ,

The first part of building a Future is ... Waiting
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...

Posted Monday, February 04, 2008 7:04 AM by Jared Parsons | 2 Comments

Filed under: , ,

Active Objects and Futures
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...

Posted Monday, January 28, 2008 11:57 PM by Jared Parsons | 5 Comments

Tuples Part 7: Mutable Tuples
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...

Posted Wednesday, January 23, 2008 2:56 AM by Jared Parsons | 1 Comments

Filed under: , , ,

CLR Memory Model
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...

Posted Thursday, January 17, 2008 12:16 PM by Jared Parsons | 1 Comments

Filed under: ,

ISynchronizeInvoke ... now
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...

Posted Monday, January 07, 2008 9:25 PM by Jared Parsons | 1 Comments

More Posts Next page »
Page view tracker