08-03-2009 05:04 PM
Maybe I have to create another project so I can post it here. Cause my code is under authentication control policy of my company. I will post the code later.
One thing I have just tried to do is removing all of the acquire and release semaphore VIs in the receive process vi and it works. Somehow these random response VI cause the deadlock. Isn't it right that the semaphore VI should control the order to access the resouce?
Best regards,
Thang Nguyen
08-03-2009 10:55 PM
Assuming you have a corresponding release semaphore for each acquire semaphore, then yes, it will provide a mutex for the resource to which you are controlling access. My suspicion is that somewhere you have logic which allows the release semaphore to be short-circuited which then eventually causes the deadlock.
Recreating this as something you can post here or send to NI customer support would be critical in helping you with the problem.