Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- C# task
- 동탄 수원 썬팅 블박
- c# 비동기
- 포인트
- Camera SPec 설명
- async
- <body oncontextmenu = "return false" ondragstart = "return false" onselectstart = "return false">
- const
Archives
- Today
- Total
끌림
async task 본문
// task
#if false // test moon
private async void AnalyzeResultTest()
{
string a = "http://www.daum.net";
WebClient web = new WebClient();
string str = await web.DownloadStringTaskAsync(new Uri(a));
Debug.Log(str);
}
private void TaskTest()
{
string a = "http://www.daum.net";
WebClient web = new WebClient();
Task<string> t = web.DownloadStringTaskAsync(new Uri(a));
#if false // 문제 코드. 블록킹.
t.Wait();
Debug.Log(t.Result);
#else
t.ContinueWith((prevTask) => Debug.Log(prevTask.Result));
#endif
}
#endif
Comments