![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
Inheritance diagram for FQueuedThread:Public Member Functions | |
| FQueuedThread ()=default | |
| virtual bool | Create (class FQueuedThreadPoolBase *InPool, uint32 InStackSize=0, EThreadPriority ThreadPriority=TPri_Normal, const TCHAR *ThreadName=nullptr) |
| virtual bool | CreateForkable (class FQueuedThreadPoolBase *InPool, uint32 InStackSize=0, EThreadPriority ThreadPriority=TPri_Normal, const TCHAR *ThreadName=nullptr) |
| bool | KillThread () |
| void | DoWork (IQueuedWork *InQueuedWork) |
Public Member Functions inherited from FRunnable | |
| virtual bool | Init () |
| virtual void | Stop () |
| virtual void | Exit () |
| virtual class FSingleThreadRunnable * | GetSingleThreadInterface () |
| virtual | ~FRunnable () |
Protected Member Functions | |
| virtual uint32 | Run () override |
| FString | SetupForCreate (class FQueuedThreadPoolBase *InPool, const TCHAR *ThreadName) |
Protected Attributes | |
| FEvent * | DoWorkEvent = nullptr |
| TAtomic< bool > | TimeToDie { false } |
| IQueuedWork *volatile | QueuedWork = nullptr |
| class FQueuedThreadPoolBase * | OwningThreadPool = nullptr |
| FRunnableThread * | Thread = nullptr |
This is the interface used for all poolable threads. The usage pattern for a poolable thread is different from a regular thread and this interface reflects that. Queued threads spend most of their life cycle idle, waiting for work to do. When signaled they perform a job and then return themselves to their owning pool via a callback and go back to an idle state.
|
default |
Default constructor
|
inlinevirtual |
Creates the thread with the specified stack size and creates the various events to be able to communicate with it.
| InPool | The thread pool interface used to place this thread back into the pool of available threads when its work is done |
| InStackSize | The size of the stack to create. 0 means use the current thread's stack size |
| ThreadPriority | priority of new thread |
|
inlinevirtual |
Attempts to creates a forkable thread (see FForkProcessHelper) with the specified stack size and creates the various events to be able to communicate with it.
Currently only works after the process has been forked because GetSingleThreadInterface() isn't implemented
| InPool | The thread pool interface used to place this thread back into the pool of available threads when its work is done |
| InStackSize | The size of the stack to create. 0 means use the current thread's stack size |
| ThreadPriority | priority of new thread |
|
inline |
Tells the thread there is work to be done. Upon completion, the thread is responsible for adding itself back into the available pool.
| InQueuedWork | The queued work to perform |
|
inline |
Tells the thread to exit. If the caller needs to know when the thread has exited, it should use the bShouldWait value and tell it how long to wait before deciding that it is deadlocked and needs to be destroyed. NOTE: having a thread forcibly destroyed can cause leaks in TLS, etc.
The real thread entry point. It waits for work events to be queued. Once an event is queued, it executes it and goes back to waiting.
Implements FRunnable.
|
inlineprotected |
Common code use by Create functions
|
protected |
The event that tells the thread there is work to do.
|
protected |
The pool this thread belongs to.
|
protected |
The work this thread is doing.
|
protected |
My Thread