FRunnableThread::Kill

Tells the thread to exit.

Choose your operating system:

Windows

macOS

Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/HAL/RunnableThread.h

Include

#include "HAL/RunnableThread.h"

Syntax

bool Kill
(
    bool bShouldWait
)

Remarks

Tells the thread to exit. If the caller needs to know when the thread has exited, it should use the bShouldWait value. It's highly recommended not to kill the thread without waiting for it. Having a thread forcibly destroyed can cause leaks and deadlocks.

The kill method is calling Stop() on the runnable to kill the thread gracefully.

Returns

Always true

Parameters

Parameter

Description

bShouldWait

If true, the call will wait infinitely for the thread to exit.