Sign In
jaredpar's WebLog
Code, rants and ramblings of a programmer.
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Tags
Active Object
Anonymous Types
API Design
BclExtras
Blogging
Books
C#
C++
Closures
CLR
CodeDom
Debugging
Developing
DotNet
EESdk
Evil
Exceptions
Expression Evaluator
Extension Methods
F#
Functional
Futures
FxCop
Generics
Gotcha
Humor
IMetaDataImport
Immutable
ISynchronizeInvoke
Lambda
LINQ
LUA
MEF
Misc
Orcas
Patterns
Performance
PInvoke
PowerShell
Rant
RantPack
Refactoring
Regex
Security
SEH
SynchronizationContext
Talks
Templates
Testing
Threading
Tuple
Type Inference
VB
Visual Studio
VsVim
WinForms
Wow64
Browse by Tags
MSDN Blogs
>
jaredpar's WebLog
>
All Tags
>
futures
Tagged Content List
Blog Post:
Factory Methods for Futures
JaredPar MSFT
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 include overloads which take in Func<T> with...
on
23 Feb 2008
Blog Post:
Building a Future which returns no Value
JaredPar MSFT
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 straight forward. The biggest decision is how...
on
18 Feb 2008
Blog Post:
Building Future<T>
JaredPar MSFT
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 the override of RunCore. The trickiest part...
on
13 Feb 2008
Blog Post:
Building the Base Future
JaredPar MSFT
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 best way to implement this behavior is through...
on
12 Feb 2008
Blog Post:
Dealing with Exceptions in a Future
JaredPar MSFT
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 free code. IMHO this is not the best way to...
on
11 Feb 2008
Blog Post:
The first part of building a Future is ... Waiting
JaredPar MSFT
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 as possible. In order to do so you need to define...
on
4 Feb 2008
Blog Post:
Active Objects and Futures
JaredPar MSFT
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 viewing that as well. The part that interested me...
on
28 Jan 2008
Page 1 of 1 (7 items)