Get the thread-local runtime context, returns nullptr if not inside a runtime.
Class Runtime
#include <Runtime.hpp>classRuntime:publicasp::EnableSharedFromThis<arc::Runtime>{ ... }
No description provided
Examples0
Public static methods3
staticasp::SharedPtr<arc::Runtime>create(arc::RuntimeOptionsconst&options)
No description provided
staticasp::SharedPtr<arc::Runtime>create(size_tworkers)
No description provided
staticarc::Runtime*current()
Public member functions14
arc::Runtime&operator=()
No description provided
arc::Runtime&operator=()
No description provided
auto&timeDriver()
No description provided
auto&signalDriver()
No description provided
auto&ioDriver()
No description provided
auto&iocpDriver()
No description provided
voidsetTerminateHandler(arc::TerminateHandlerhandler)
Set the function that is called when an uncaught exception causes runtime termination. By default, this function just rethrows the exception to call std::terminate().
voidenqueueTask(arc::TaskBase*task)
No description provided
template<typename T = void>arc::BlockingTaskHandle<T>spawnBlocking()
No description provided
boolisShuttingDown()const
No description provided
voidsafeShutdown()
Safely shuts down the runtime and blocks until it is complete. A runtime can often be shutdown by simply dropping all references to it, but this method ensures all tasks and worker threads are immediately destroyed before returning.
std::vector<asp::SharedPtr<arc::TaskDebugData>>getTaskStats()
No description provided