11-08-2017 12:06 PM
I have two operations which can proceed independently, so I have one going in a different thread.
Rarely a situation arises when I need to issue the unit under test a command that would impact the other thread. I would like to make sure the other thread is finished before doing this.
Is this information available?
I'm using TS 2013 in sequential mode.
11-08-2017 01:08 PM
Is this how it's typically done? Seems simple enough to write to a file global variable in the thread being monitored, and then query its status from the other thread:
11-08-2017 02:01 PM
That's a completely valid option, but i'd argue a notification is a more elegant solution. Aside from just checking the notification periodically, this gives you the option to wait on it. You also get a few other nice freebies, like being able to check the number of threads waiting, or being able to send some data that describes the state of the thread.
Either way, you should be using termination monitor so your sequence doesn't hang if someone terminates the execution.
Hope this helps!
Trent
11-09-2017 08:56 AM
Thanks for the suggestion. I'll dig into that some more.