Sign In
jaredpar's WebLog
Code, rants and ramblings of a programmer.
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
About
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Tags
API Design
C#
C++
Closures
Debugging
DotNet
F#
Futures
Generics
Gotcha
Immutable
Lambda
LINQ
Misc
Orcas
Patterns
PInvoke
PowerShell
Rant
Threading
Tuple
Type Inference
VB
Visual Studio
VsVim
Archive
Archives
May 2012
(1)
July 2011
(1)
March 2011
(3)
January 2011
(3)
November 2010
(2)
October 2010
(2)
September 2010
(1)
July 2010
(5)
June 2010
(8)
May 2010
(2)
April 2010
(1)
March 2010
(2)
February 2010
(5)
January 2010
(2)
December 2009
(6)
November 2009
(3)
October 2009
(1)
September 2009
(1)
August 2009
(1)
June 2009
(2)
May 2009
(1)
April 2009
(3)
March 2009
(2)
February 2009
(3)
January 2009
(10)
December 2008
(6)
November 2008
(7)
October 2008
(20)
September 2008
(8)
August 2008
(11)
July 2008
(5)
June 2008
(13)
May 2008
(9)
April 2008
(16)
March 2008
(7)
February 2008
(11)
January 2008
(13)
December 2007
(6)
November 2007
(9)
October 2007
(10)
September 2007
(5)
August 2007
(8)
July 2007
(2)
June 2007
(2)
May 2007
(3)
April 2007
(3)
February 2007
(3)
January 2007
(8)
December 2006
(3)
November 2006
(2)
October 2006
(4)
September 2006
(1)
August 2006
(1)
July 2006
(2)
April 2006
(7)
November 2005
(3)
October 2005
(1)
September 2005
(1)
August 2005
(2)
July 2005
(8)
June 2005
(1)
May 2005
(7)
April 2005
(4)
March 2005
(4)
February 2005
(2)
January 2005
(2)
November 2004
(1)
September 2004
(3)
February, 2008
MSDN Blogs
>
jaredpar's WebLog
>
February, 2008
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
jaredpar's WebLog
SynchronizationContext and Higher Order Functions
Posted
over 4 years ago
by
JaredPar MSFT
1
Comments
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...
jaredpar's WebLog
Factory Methods for Futures
Posted
over 4 years ago
by
JaredPar MSFT
1
Comments
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...
jaredpar's WebLog
Thread Affinity
Posted
over 4 years ago
by
JaredPar MSFT
1
Comments
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...
jaredpar's WebLog
Multiple paths to IUnknown
Posted
over 4 years ago
by
JaredPar MSFT
0
Comments
ATL has a lot of great tools for COM programming and CComPtr is a good example. It's a smart pointer class which manages the reference count of an underlying COM object. One of it's limitations though is it will only work properly when the inheritance...
jaredpar's WebLog
Building a Future which returns no Value
Posted
over 4 years ago
by
JaredPar MSFT
1
Comments
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...
jaredpar's WebLog
Building Future<T>
Posted
over 4 years ago
by
JaredPar MSFT
4
Comments
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...
jaredpar's WebLog
Building the Base Future
Posted
over 4 years ago
by
JaredPar MSFT
5
Comments
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...
jaredpar's WebLog
Dealing with Exceptions in a Future
Posted
over 4 years ago
by
JaredPar MSFT
7
Comments
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...
jaredpar's WebLog
Push Enumerators
Posted
over 4 years ago
by
JaredPar MSFT
1
Comments
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...
jaredpar's WebLog
The first part of building a Future is ... Waiting
Posted
over 4 years ago
by
JaredPar MSFT
2
Comments
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...
jaredpar's WebLog
Get-Content and File Names
Posted
over 4 years ago
by
JaredPar MSFT
1
Comments
Another day, another PowerShell feature discovered. Unfortunately this time it was a feature that made me think I had a bug in my script. The script read through some directories, did some file parsing and created a data object for every directory...
Page 1 of 1 (11 items)