Thank you, I can use Interrupt, I do some complex calculate, and it need about 10sec but sometime the calculate can't have a resault, so it will go on for ever,then after 10 sec I want to kill it because it need too much memory.
For example, I generate numbers randomizely and record each number in memory, if I got number 10, the thread will end, but if in 10sec I don't get 10, the thread will go on until it got number 10... So I want to kill it.
:icon_clap: