Control.MailboxProcessor<'Msg> 생성자(F#)
에이전트를 만듭니다.
네임스페이스/모듈 경로: Microsoft.FSharp.Control
어셈블리: FSharp.Core(FSharp.Core.dll)
// Signature:
new MailboxProcessor : (MailboxProcessor<'Msg> -> Async<unit>) * ?CancellationToken -> MailboxProcessor<'Msg>
// Usage:
new MailboxProcessor (body)
new MailboxProcessor (body, cancellationToken = cancellationToken)
매개 변수
body
형식: MailboxProcessor<'Msg> -> Async<unit>Start가 호출될 때 MailboxProcessor에 대한 읽기 루프로 실행될 비동기 계산을 생성하는 함수입니다.
cancellationToken
형식: CancellationTokenbody에 대한 선택적 취소 토큰입니다.기본값은 Async.DefaultCancellationToken입니다.
반환 값
만들어진 MailboxProcessor입니다.
설명
body 함수는 에이전트에 의해 실행되는 비동기 계산을 생성하는 데 사용됩니다.이 함수는 Start를 호출하기 전까지 실행되지 않습니다.
플랫폼
Windows Windows 서버 2012, Windows Server 2008 R2, Windows 7, 8
버전 정보
F# 코어 라이브러리 버전
지원: 2.0, 4.0, 노트북