Simple class for tests involving a SynchronizationContext

Recently I had to test a class which heavily depended upon a SynchronizationContext.  This threw me off for about half an hour as I didn’t want to write multi-threaded unit tests.  Multi-threaded code is difficult enough without adding needless threads.  The solution I came up with is simple and gives the unit test a large…

1

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 since WinForms respond to events such as Click, Move, etc…  These events are sourced…

1