NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any way to tell when a task has a lock

Normally I can just keep track of it. But upon an external termination I can get into problems. If I don't release a lock, well it stays locked. If I release it and don't have it I get a run time error. But I can't find a way to ask a lock if I have it.
0 Kudos
Message 1 of 3
(3,047 Views)
ChasGI,

Unfortunately, there is not a way to query a lock to determine what/who posseses it.

The Get Status lock operation returns the Number of Threads Waiting to Lock the Lock. You could get creative with that.

Matt P.
Applications Engineer
National Instruments
Message 2 of 3
(3,047 Views)
Thanks, Actually I found something that does what I want. If I lock with lifetime of thread then if the tread is terminated release comes freely and naturally.
0 Kudos
Message 3 of 3
(3,047 Views)