닷넷과 Win rt의 비동기 패턴
Upcoming SlideShare
Loading in...5
×
 

닷넷과 Win rt의 비동기 패턴

on

  • 1,606 views

Sample Download here : https://skydrive.live.com/?cid=32af35171a69595b&id=32AF35171A69595B%21265

Sample Download here : https://skydrive.live.com/?cid=32af35171a69595b&id=32AF35171A69595B%21265

Statistics

Views

Total Views
1,606
Views on SlideShare
781
Embed Views
825

Actions

Likes
2
Downloads
4
Comments
0

4 Embeds 825

http://www.hoons.net 576
http://hoons.net 245
http://ucclight.hoons.net 2
http://211.233.63.3 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

닷넷과 Win rt의 비동기 패턴 닷넷과 Win rt의 비동기 패턴 Presentation Transcript

  • 닷넷과 WINRT의 비동기 패턴 훈스닷넷 WINDOWS 8 시삽 윤병걸
  • WINDOWS 8 PLATFORM
  • 비동기 프로그래밍 모델 .NET Framework WinRT •Task •IAsyncOperation<T> •Task<T> •IAsyncAction
  • LANGUAGE PROJECTIONS
  • TASK, TASK<T>• TASKCOMPLETIONSOURCE<TRESULT>• CONFIGUREAWAIT()• CANCELLATIONTOKENSOURCE• WHENANY(), WHENALL()• WAITALL(), WAITANY()• ETC…
  • TASKCOMPLETIONSOURCE<TRESULT>• TASK를 만드는 일반적인 매커니즘• SETERROR ()• SETCANCEL()• SETRESULT()
  • WinRTSynchronizationContextOnCompleted(Action continuation) Post() Continuation delegateAsync UI Thread Message Pump Message Queue
  • CONFIGUREAWAIT(TRUE OR FALSE)• 컴파일러의 마샬링 작업 수행여부를 결정• TRUE : (DEFAULT) 마샬링 작업 수행• FALSE : 마샬링 작업 수행하지 않음
  • CANCELLATIONTOKENSOURCE• 현재 수행중인 비동기 작업에 취소요청• TOKEN을 부여할 때마다 새로운 복사본을 생성• 작업을 취소하는 경우 대리자에서 THROWIFCANCELLATIONREQUESTED를 호출하는 것을 권장.
  • IPROGRESS• TASK에서 진행률을 표시하는데 사용
  • COMBINATORS• WHENALL, WHENANY• WAITALL, WAITANY• CONTINUEWITH
  • WINRT 비동기 기본 형식
  • ASYNCINFO.RUN• TASK를 IASYNCOPERATION형으로 변환• 비동기 작업에 취소를 지원할 수 있음• 비동기 작업에 진행률 표시를 지원할 수 있음
  • IASYNCOPERATION 구현
  • ASASYNCOPERATION의 구현
  • STATUS 비교From TaskStatus To AsyncStatusRanToCompletion CompletedFaulted ErrorCanceled CanceledAll other values & cancellation was requested CanceledAll other values & cancellation was not requested Started
  • AsAsyncOperation() WinRT용 IAsync 라이브러리를 제작IAsyncOperation Task 한다면 보다 많은 제공. operation IAsyncOperation 타입을 반환해야 함. AsTask()
  • REFERENCE• HTTP://BLOGS.MSDN.COM/B/WINDOWSAPPDEV/ARCHIVE/2012/04/24/DIVING-DEEP-WITH- WINRT-AND-AWAIT.ASPX• HTTP://BLOGS.MSDN.COM/B/WINDOWSAPPDEV/ARCHIVE/2012/06/14/EXPOSING-NET- TASKS-AS-WINRT-ASYNCHRONOUS-OPERATIONS.ASPX• HTTP://MSDN.MICROSOFT.COM/EN-US/LIBRARY/DD997364.ASPX• HTTP://MSDN.MICROSOFT.COM/EN-US/MAGAZINE/FF959203.ASPX
  • QUESTION
  • THANK YOU