Class Runtime

#include <Runtime.hpp>
classRuntime:publicasp::EnableSharedFromThis<arc::Runtime>{ ... }
No description provided
Examples0
Public static methods3
staticasp::SharedPtr<arc::Runtime>create()
No description provided
staticasp::SharedPtr<arc::Runtime>create(
size_tworkers
)
No description provided
staticarc::Runtime*current()

Get the thread-local runtime context, returns nullptr if not inside a runtime.

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()

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()
No description provided
template<typename F>autospawn(
F&&func
)
No description provided
template<typename T = void>arc::BlockingTaskHandle<T>spawnBlocking()
No description provided
template<typename F>autoblockOn(
F&&func
)
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
Fields0
Protected member functions0
Protected fields0
Derived classes0