I started writing a thread-safe wrapper for Router / Private::RouterHandler to support adding and removing routes dynamically, when I saw in the RouterHandler comments:
/**
* Used for mutable router. Useful if it is required to
* add/remove routes at runtime.
* \param[in] router Pointer to a (mutable) router.
*/
explicit RouterHandler(std::shared_ptr<Rest::Router> router);
I wondered how this might be done safely, once the server is running? Can it only be done when processing a request on a single-threaded server?
I started writing a thread-safe wrapper for Router / Private::RouterHandler to support adding and removing routes dynamically, when I saw in the RouterHandler comments:
I wondered how this might be done safely, once the server is running? Can it only be done when processing a request on a single-threaded server?