Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
thread kill
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Threading.Tasks; using System.Threading; namespace Rextester { public class Program { public static void Main(string[] args) { ThreadingClass th = new ThreadingClass(); Thread thread1 = new Thread(th.DoStuff); thread1.Start(); Console.WriteLine("Press any key to exit!!!"); Console.ReadKey(); th.Stop(); thread1.Join(); } } public class ThreadingClass { private bool flag = false; public void DoStuff() { while (!flag) { Console.WriteLine(" Thread is Still Working"); Thread.Sleep(1000); } } public void Stop() { flag = true; } } }
run
|
edit
|
history
|
help
1
Math 9.6
Expand Treeview Job Entry
Main
nr
Split IPs to 8 and 16
5. Generics
ch.murali krishna
ffsfsfsfsfsferwfehtyjrvgjb
іфи
SAF Mid Terms