Boost C++ Libraries/Boost.Asio

Boost.Asio 색인 - basic_system_executor::dispatch

까마귀75 2021. 1. 21. 09:36
728x90
반응형

basic_system_executor::dispatch

주어진 함수 개체를 호출하도록 시스템 실행기(executor)에 요청한다.

template<
    typename Function,
    typename OtherAllocator>
void dispatch(
    Function && f,
    const OtherAllocator & a) const;


이 함수는 실행기(executor)에게 주어진 함수 개체를 실행하도록 요청하기 위해 사용된다. 함수 개체는 이 함수 내부에서 절대 실행되지 않는다.

파라미터

이 름 설 명
f 호출되는 함수 개체이다. 실행기(executor)는 필요에 따라 핸들러 개체의 복사본을 만든다. 함수 개체의 함수 서명은 다음과 같아야 한다:
void function();
a 함수 호출에 필요한 내부 저장소를 할당하기 위해 실행기(executor)가 사용할 수 있는 할당기(allocator)이다.


Boost.Asio 홈

728x90
반응형