Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
21
Task/Concurrent-computing/C-sharp/concurrent-computing-1.cs
Normal file
21
Task/Concurrent-computing/C-sharp/concurrent-computing-1.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
static Random tRand = new Random();
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Thread t = new Thread(new ParameterizedThreadStart(WriteText));
|
||||
t.Start("Enjoy");
|
||||
|
||||
t = new Thread(new ParameterizedThreadStart(WriteText));
|
||||
t.Start("Rosetta");
|
||||
|
||||
t = new Thread(new ParameterizedThreadStart(WriteText));
|
||||
t.Start("Code");
|
||||
|
||||
Console.ReadLine();
|
||||
}
|
||||
|
||||
private static void WriteText(object p)
|
||||
{
|
||||
Thread.Sleep(tRand.Next(1000, 4000));
|
||||
Console.WriteLine(p);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue