Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/FRunnableThread
Description
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.
| Name | Kill |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/HAL/RunnableThread.h |
| Include Path | #include "HAL/RunnableThread.h" |
bool Kill
(
bool bShouldWait
)
Always true
Parameters
| Name | Remarks |
|---|---|
| bShouldWait | If true, the call will wait infinitely for the thread to exit. |