ordered_message_processor 클래스

ordered_message_processor는 메시지 블록이 수신된 순서대로 메시지를 처리할 수 있도록 하는 message_processor입니다.

구문

template<class T>
class ordered_message_processor : public message_processor<T>;

매개 변수

T
프로세서에서 처리하는 메시지의 페이로드 유형입니다.

멤버

공용 Typedefs

이름 설명
type 에 대한 형식 별칭입니다 T.

공용 생성자

속성 설명
ordered_message_processor ordered_message_processor 개체를 생성합니다.
~ordered_message_processor 소멸자 개체를 ordered_message_processor 삭제합니다.

공용 메서드

이름 설명
async_send 아직 수행되지 않은 경우 비동기적으로 메시지를 큐에 대기시키고 처리 작업을 시작합니다. (message_processor::async_send 재정의)
초기화 적절한 콜백 함수, 스케줄러 및 일정 그룹을 사용하여 개체를 초기화 ordered_message_processor 합니다.
initialize_batched_processing 일관 처리된 메시지 처리 초기화
sync_send 아직 수행되지 않은 경우 메시지를 동기적으로 큐에 대기시키고 처리 작업을 시작합니다. (message_processor::sync_send 재정의)
wait 모든 비동기 처리 작업이 블록을 삭제하기 전에 완료할 시간이 있는지 확인하기 위해 메시지 블록의 소멸자에서 사용되는 프로세서별 스핀 대기입니다. (message_processor::wait를 재정의합니다.)

보호된 메서드

속성 설명
process_incoming_message 비동기적으로 호출되는 처리 함수입니다. 메시지를 큐에서 제거하고 처리를 시작합니다. (message_processor::p rocess_incoming_message를 재정의합니다.)

상속 계층 구조

message_processor

ordered_message_processor

요구 사항

헤더: agents.h

네임스페이스: 동시성

async_send

아직 수행되지 않은 경우 비동기적으로 메시지를 큐에 대기시키고 처리 작업을 시작합니다.

virtual void async_send(_Inout_opt_ message<T>* _Msg);

매개 변수

_메시지
메시지에 대한 포인터입니다.

초기화

적절한 콜백 함수, 스케줄러 및 일정 그룹을 사용하여 개체를 초기화 ordered_message_processor 합니다.

void initialize(
    _Inout_opt_ Scheduler* _PScheduler,
    _Inout_opt_ ScheduleGroup* _PScheduleGroup,
    _Handler_method const& _Handler);

매개 변수

_PScheduler
경량 작업을 예약하는 데 사용할 스케줄러에 대한 포인터입니다.

_PScheduleGroup
경량 작업을 예약하는 데 사용할 일정 그룹에 대한 포인터입니다.

_처리기
콜백 중에 호출된 처리기 펀터입니다.

initialize_batched_processing

일관 처리된 메시지 처리 초기화

virtual void initialize_batched_processing(
    _Handler_method const& _Processor,
    _Propagator_method const& _Propagator);

매개 변수

_프로세서
콜백 중에 호출된 프로세서 펀터입니다.

_전파자
콜백 중에 호출된 전파자 펀터입니다.

ordered_message_processor

ordered_message_processor 개체를 생성합니다.

ordered_message_processor();

설명

함수 ordered_message_processor 가 호출될 때까지 initialize 비동기 또는 동기 처리기를 예약하지 않습니다.

~ordered_message_processor

개체를 ordered_message_processor 삭제합니다.

virtual ~ordered_message_processor();

설명

처리기를 삭제하기 전에 모든 미해결 비동기 작업을 기다립니다.

process_incoming_message

비동기적으로 호출되는 처리 함수입니다. 메시지를 큐에서 제거하고 처리를 시작합니다.

virtual void process_incoming_message();

sync_send

아직 수행되지 않은 경우 메시지를 동기적으로 큐에 대기시키고 처리 작업을 시작합니다.

virtual void sync_send(_Inout_opt_ message<T>* _Msg);

매개 변수

_메시지
메시지에 대한 포인터입니다.

wait

모든 비동기 처리 작업이 블록을 삭제하기 전에 완료할 시간이 있는지 확인하기 위해 메시지 블록의 소멸자에서 사용되는 프로세서별 스핀 대기입니다.

virtual void wait();

참고 항목

concurrency 네임스페이스