It is accessed by at least two threads:

* `[shutoff]` in `UnregisterHTTPHandler`
* `[http]` in `http_request_cb`
evthread_use_windows_threads();
#else
    evthread_use_pthreads();
#endif
    raii_event_base base_ctr = obtain_event_base();
    
    raii_evhttp http_ctr = obtain_evhttp(base_ctr.get());
    struct evhttp* http = http_ctr.get();
    if (!http) {
        LogPrintf("couldn't create evhttp. Exiting.\n");
        return false;
    }
    evhttp_set_timeout(http, gArgs.GetIntArg("-rpcservertimeout", DEFAULT_HTTP_SERVER_TIMEOUT));
    evhttp_set_max_headers_size(http, MAX_HEADERS_SIZE);
    evhttp_set_max_body_size(http, MAX_SIZE);
    evhttp_set_gencb(http, http_request_cb, nullptr);
    if (!HTTPBindAddresses(http)) {
        LogPrintf("Unable to bind any endpoint for RPC server\n");
        return false;
    }
    LogPrint(BCLog::HTTP, "Initialized HTTP server\n");
    int workQueueDepth = std::max((long)gArgs.GetIntArg("-rpcworkqueue", DEFAULT_HTTP_WORKQUEUE), 1L);
    LogPrintfCategory(BCLog::HTTP, "creating work queue of depth %d\n", workQueueDepth);
    g_work_queue = std::make_unique<WorkQueue<HTTPClosure>>(workQueueDepth);
    
    eventBase = base_ctr.release();
    eventHTTP = http_ctr.release();
    return true;
}
void UpdateHTTPServerLogging(bool enable) {