11-03-2005 12:49 PM
11-04-2005 11:34 AM - edited 11-04-2005 11:34 AM
Message Edited by Tyler T. on 11-04-2005 11:35 AM
11-04-2005 12:01 PM
Tyler,
Very interesting, and it makes sense. I sent my sequence file to Robert Welcher at National Instruments yesterday. I have probably several hundred locks grouped in primary locks. Would having a unique name for each lock eliminate this problem? I could list my locks in numerical order. Your thoughts.
Tony
11-04-2005 05:31 PM
For a deadlock to occur, you would have to have some cycle exist. If you always lock and unlock your locks in the same order, you can avoid deadlock.
So if you need to lock many locks for a section of code, always lock them in alphabetical order, and unlock them in reverse.
Allen P.
NI