folly::EventBase::setStrictLoopThread

Enable strict loop thread mode. This is intended for executors that take ownership of the EventBase and run it continuously until joined. Once set, it is not possible to unset it.

Synopsis

Declared in <folly/io/async/EventBase.h>

void
setStrictLoopThread();

Description

In this mode:

  • isInEventBaseThread() returns false if the loop is not running.

  • Calling terminateLoopSoon() is not allowed, as the executor is in control of the loop lifetime.