One technique that can help a lot is to make sure you always request locks
in the same order. That way, you won't get process A which has lock 1 and
lock 2, and process B which has lock 2 and needs lock 1.
Sticking to this rule sometimes means that you get more locks than you
need, but it will help to avoid deadlocks.
Hope this helps,
Andy Cohen, consultant
> I was curious if there was some guide that has been compiled to avoid
> deadlocks. Currently the project that I am working on suffers due to these
> dealocks. Would it be best to retry if there was a deadlock for x attempts,
> or develope some kind of semaphore approach?
> Thanks in advance...