As part of the graceful .NET 4.5 application shutdown I want to dispose the instance of Windsor Castle IoC container. The container has about 100 objects that were instantiated during the application lifetime and subset of them have IDisposable implemented that will be called as part of container dispose mechanism.
What I find surprising is that there is about of 10 seconds delay: - from the moment when I call container.Dispose() - to the moment when first Dispose() is called on one of the objects from the application
This increases application closing time to unacceptable level because now user must wait for more than 10 seconds for the application shutdown. (note: CPU is Intel i5 and there are 6gb of RAM)
I am not sure what logic is Windsor container executing under the hood but I was wondering is there any way I can reduce this delay?