Function setGlobalRuntime

#include <Runtime.hpp>voidsetGlobalRuntime()

Sets the global runtime that will be returned from Runtime::current(). This is not thread-safe and not recommended to use in applications. It is used in cases when multiple libraries statically link arc, but share a single runtime. The library that owns the runtime will automatically have Runtime::current() work well, but other libraries won’t. They must obtain the runtime pointer and call this function.

Notably, this will also lead to Runtime::current() being non-null not inside task context.

Examples0