Skip to content
< All Topics

Thread safe methods in Experior

To safely change properties and call methods in Experior be sure that you are running in the “Engine thread”. If the Property Experior.Core.Environment.InvokeRequried is false, then you are running in the “Engine thread”. Otherwise you need to invoke the method call.

Example code:

private void SomeMethod()
{
    if (Experior.Core.Environment.InvokeRequired)
    {
        //Not running in Experior Engine thread
        Experior.Core.Environment.Invoke(SomeMethod);
        return;
    }

    //Put method code here.
    //Code is executed in Experior engine thread
    //and it is safe to call Experior methods.
    ...
}
Was this article helpful?
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.