Browse files

Changed the example project to use the synchronous dispatcher for now…

… because the async dispatcher was conflicting with the "using (store = WireupEventStore())" statement. Specifically, execution could and usually did exit the using block, causing the IStoreEvents object and all of its dependencies to be disposed, before the async dispatcher had a chance to mark the last commit as dispatched in the SQL database. This would cause unexpected output on the next execution of the example program as it first dispatched commits that hadn't been dispatched by the last execution, or sometimes it would simply crash with an ObjectDisposedException.
  • Loading branch information...
1 parent 104e71e commit 8b30f49bad567fca1f690085a35ce004f19c18e5 @SaintGimp SaintGimp committed Jan 25, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 doc/EventStore.Example/MainProgram.cs
View
2 doc/EventStore.Example/MainProgram.cs
@@ -40,7 +40,7 @@ private static IStoreEvents WireupEventStore()
.Compress()
.EncryptWith(EncryptionKey)
.HookIntoPipelineUsing(new[] { new AuthorizationPipelineHook() })
- .UsingAsynchronousDispatchScheduler()
+ .UsingSynchronousDispatchScheduler()
.DispatchTo(new DelegateMessageDispatcher(DispatchCommit))
.Build();
}

0 comments on commit 8b30f49

Please sign in to comment.