Can Unity be made to not throw SynchronizationLockException all the time?

前端 未结 8 1385
借酒劲吻你
借酒劲吻你 2020-11-29 18:36

The Unity dependency injection container has what seems to be a widely known issue where the SynchronizedLifetimeManager will often cause the Monitor.Exit method to throw a

8条回答
  •  失恋的感觉
    2020-11-29 18:45

    The answer to your question is unfortunately no. I followed up on this with the dev team here at the Microsoft patterns & practices group (I was the dev lead there until recently)and we had this as a bug to consider for EntLib 5.0. We did some investigation and came to the conclusion that this was caused by some unexpected interactions between our code and the debugger. We did consider a fix but this turned out to be more complex than the existing code. In the end this got prioritized below other things and didn't make the bar for 5.

    Sorry I don't have a better answer for you. If it's any consolation I find it irritating too.

提交回复
热议问题