Stop Thread
Posted: Sat Jan 18, 2014 11:20 pm
We have PlaySound(), and we can stop playback immediately with StopSound(). Am I right to think that the Sound Lib runs in a separate thread?
The reason I ask is that I feel the Thread Library is missing a function: Stop Thread. In some situations, stopping a thread that has a repeat loop is too slow if reliant on checking for a global var change, as recommended in the help. The alternative in that case is Kill Thread, which is too abrupt because the thread cannot run it's clean-up. So, a Stop Thread Function would in an ideal world deliver the best of both - stop quickly but complete it's current cycle.
Am I as mad as the mirror suggests?
The reason I ask is that I feel the Thread Library is missing a function: Stop Thread. In some situations, stopping a thread that has a repeat loop is too slow if reliant on checking for a global var change, as recommended in the help. The alternative in that case is Kill Thread, which is too abrupt because the thread cannot run it's clean-up. So, a Stop Thread Function would in an ideal world deliver the best of both - stop quickly but complete it's current cycle.
Am I as mad as the mirror suggests?