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.

Blog Roll

Eric Lippert
Dustin Campbell
Jon Skeet
Coding Horror
Brian McNamara
Hub FS
Full List

Browse by Tags

All Tags » Futures   (RSS)
Factory Methods for Futures
Like most generic classes, I prefer to create Future instances through static factory methods which allows me to take maximum advantage of type inference. In addition to the 2 straight forward declaration of Func<T> and Action, the methods will Read More...

Posted Saturday, February 23, 2008 8:35 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: , ,

Dealing with Exceptions in a Future
Besides waiting, the another important issue when dealing with Futures is how to deal with exceptions thrown by the user specified code.  Option 1: Ignore the Exception Don't take any actions in the future code and force users to write exception Read More...

Posted Monday, February 11, 2008 11:36 AM by Jared Parsons | 7 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

Page view tracker