Th=new Thread (()=& gt;
{
SetResult (Utils. Search (60));
});
Th. IsBackground=true;
Th. The Start ();
Th. Abort ();//terminate threads
CancellationTokenSource CTS=new CancellationTokenSource ();
String res="";
Await Task. Run (()=& gt;
{
The timer. The Start ();
Res=Utils. Search (60);
}, CTS. Token);
if (! CTS. IsCancellationRequested)
{
SetResult (res);
}
Usage scenario is like making sweeping pay (WeChat and pay treasure) code, generate WeChat qr code to tune the query at the same time, during this period and click on the pay treasure to qr code, so you need to query the thread WeChat stop off (to train of thought that is the case, but the thread is not to say stop, don't know how to do,,), have what good solution for