IsOutsideMainThread

From GECK
Jump to: navigation, search


A function added by the ShowOff NVSE Plugin version 1.50.

Description

Returns true if the function is being called from outside the game's main thread.

This can be used to avoid calling code that may be unsafe when outside the main thread. For example, when outside the main thread, the Print functions can cause a crash if ToggleDebugText is on.

In most cases, the only way to run code from outside the main thread is by using certain Event Handlers, which may be invoked from code residing in a helper thread.

Syntax

[help]
(isOutside:bool) IsOutsideMainThread