On 29-9-2011 17:37, Scott Morgan wrote: > On 09/29/2011 04:20 PM, Mark Rotteveel wrote: >> The solution would at minimum require that FbCommand.Dispose sync in the >> exact same order as Rollback (so first database.syncObject, and then >> GdsStatement) (or that Rollback use the exact same order as in Dispose). >> Then it is impossible for deadlock to occur (assuming that the transaction >> isn't locked further on the Dispose method). > > Easier said than done, the locks are made at different points in the > code, not all in the one function. See the call stacks at the end of the > original message.
True, but making sure that you always lock resources in the same order, is the only sure way to prevent deadlocks. > Worth noting also that there are a lot of 'lock(this)' entries, which is > something MS recommends against in it's docs. I know next to nothing about .NET, I just follow this list as I recently started working on Jaybird and things posted here might have similar problems or applications in Jaybird :) -- Mark Rotteveel ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 _______________________________________________ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider