티스토리 뷰


// C# 1.0 Style Thread
using System;
using System.Threading;

namespace ThreadSample
{
class Program
{
static void Main(string[] args)
{
// C# 1.0 Style Thread uses ThreadStart
ThreadStart ts = new ThreadStart(Work);
Thread t1 = new Thread(ts);

t1.Start();

for (int count = 0; count < Repetitions; count++)
{
Console.Write('@');
}
}

static void Work()
{
for (int count = 0; count < Repetitions; count++)
{
Console.Write('.');
}
}

const int Repetitions = 1000;
}
}


'Ongoing > Thread' 카테고리의 다른 글

Thread [Java] implements Runnable  (0) 2018.07.16
Thread [C#] C# 2.0 Style Thread without ThreadStart  (0) 2018.07.16
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2025/12   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
글 보관함