Function getIOThreadStorageLoop

Synopsis

#include <lib/inc/drogon/IOThreadStorage.h>

trantor::EventLoop * getIOThreadStorageLoop(size_t index) noexcept(false)

Description

No description yet.

Source

Lines 157-166 in lib/inc/drogon/IOThreadStorage.h.

inline trantor::EventLoop *getIOThreadStorageLoop(size_t index) noexcept(false)
{
    if (index > drogon::app().getThreadNum())
    {
        throw std::out_of_range("Event loop index is out of range");
    }
    if (index == drogon::app().getThreadNum())
        return drogon::app().getLoop();
    return drogon::app().getIOLoop(index);
}





Add Discussion as Guest

Log in