Rate this Page

Function c10::WarningUtils::set_warning_handler#

Function Documentation#

void c10::WarningUtils::set_warning_handler(WarningHandler *handler) noexcept(true)#

Sets the global warning handler.

This is not thread-safe, so it should generally be called once during initialization or while holding the GIL for programs that use python. User is responsible for keeping the WarningHandler alive until it is not needed.