Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Deadlock Example
//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.Threading; using System.Threading.Tasks; namespace Rextester { public class Program { public static void Main(string[] args) { object lockA = new object(); object lockB = new object(); var up = Task.Run(() => { lock (lockA) { Thread.Sleep(1000); lock (lockB) { Console.WriteLine("Locked A and B"); } } }); lock(lockB) { lock(lockA) { Console.WriteLine("Locked A and B"); } } up.Wait(); } } }
run
|
edit
|
history
|
help
0
dima
Bubble sort
OBJ Good Start
Jerold
asdfrgthyjuhtgrfed
F ?
pankaj_sql
bytes to string to bytes.
D112
test