there is a call call code by pressing the button
StartUp start = new StartUp(this); my = new Thread(start.Go); my.Start(); There is a code to end the stream by pressing another button.
my.Abort(); and the function itself is passed to the stream
public void Go () { int max = work.max_thread; label1: if (work.keys.Count>0) { while (count_thread == 0 || count_thread < max) { Thread myThread = new Thread(web.InD); myThread.Start(); count_thread += 1; } Thread.Sleep(1000); goto label1; } }
CancellationTokeninstead ofAbort- 4perAbort- we lose it!goto- we lost him ... - Alexander Petrov