folly::getKeepAliveToken

getKeepAliveToken overloads

Synopses

Declared in <folly/Executor.h>

Returns a keep-alive token referring to executor.

template<typename ExecutorT>
Executor::KeepAlive<ExecutorT>
getKeepAliveToken(ExecutorT& executor);
» more...

Returns a copy of the keep-alive token ka.

template<typename ExecutorT>
Executor::KeepAlive<ExecutorT>
getKeepAliveToken(Executor::KeepAlive<ExecutorT>& ka);
» more...

Returns a keep-alive token which guarantees that Executor will keep processing tasks until the token is released (if supported by Executor). KeepAlive always contains a valid pointer to an Executor.

template<typename ExecutorT>
Executor::KeepAlive<ExecutorT>
getKeepAliveToken(ExecutorT* executor);
» more...

Return Value

  • A keep-alive token referring to executor.
  • A copy of ka.

Parameters

NameDescription
executorThe executor to obtain a keep-alive token for.
kaThe keep-alive token to copy.