views:

251

answers:

1

I need a custom SynchronizationContext that:

  • Owns a single thread that runs "Posts" and "Sends" delegates
  • Does the send in the order they are send in
  • No other methods are needed

I need this so I can unit test some threading code that will talk to WinForm in the real application.

Before I write my own, I was hoping that someone could point me to a simple (and small) implementations.

+1  A: 

idesign.net (search for Custom Synchronization Context on the page) has a SynchronizationContext that will do the job, however it is more complex them I need.

Ian Ringrose