Interface for "runnable" objects. 更多...
#include <Runnable.h>
类 FRunnable 继承关系图:Public 成员函数 | |
| virtual void | Exit () |
| Exits the runnable object. 更多... | |
| virtual class FSingleThreadRunnable * | GetSingleThreadInterface () |
| Gets single thread interface pointer used for ticking this runnable when multi-threading is disabled. 更多... | |
| virtual bool | Init () |
| Initializes the runnable object. 更多... | |
| virtual uint32 | Run ()=0 |
| Runs the runnable object. 更多... | |
| virtual void | Stop () |
| Stops the runnable object. 更多... | |
| virtual | ~FRunnable () |
| Virtual destructor | |
Interface for "runnable" objects.
A runnable object is an object that is "run" on an arbitrary thread. The call usage pattern is Init(), Run(), Exit(). The thread that is going to "run" this object always uses those calling semantics. It does this on the thread that is created so that any thread specific uses (TLS, etc.) are available in the contexts of those calls. A "runnable" does all initialization in Init().
If initialization fails, the thread stops execution and returns an error code. If it succeeds, Run() is called where the real threaded work is done. Upon completion, Exit() is called to allow correct clean up.
|
inlinevirtual |
Exits the runnable object.
Called in the context of the aggregating thread to perform any cleanup.
被 FMultichannelTcpReceiver, FMultichannelTcpSender, FInteractiveProcess, FMonitoredProcess, FUdpSocketReceiver, FUdpSocketSender , 以及 FPreLoadScreenSlateThreadTask 重载.
|
inlinevirtual |
Gets single thread interface pointer used for ticking this runnable when multi-threading is disabled.
If the interface is not implemented, this runnable will not be ticked when FPlatformProcess::SupportsMultithreading() is false.
被 Audio::IAudioMixerPlatformInterface, FMonitoredProcess, FUdpSocketReceiver , 以及 FUdpSocketSender 重载.
|
inlinevirtual |
Initializes the runnable object.
This method is called in the context of the thread object that aggregates this, not the thread that passes this runnable to a new thread.
被 FThreadHeartBeat, FAsyncWriter, FMultichannelTcpReceiver, FMultichannelTcpSender, FInteractiveProcess, FMonitoredProcess, FUdpSocketReceiver, FUdpSocketSender , 以及 FPreLoadScreenSlateThreadTask 重载.
|
pure virtual |
Runs the runnable object.
This is where all per object thread work is done. This is only called if the initialization was successful.
在 FThreadHeartBeat, FAsyncWriter, FMultichannelTcpReceiver, FMultichannelTcpSender, Audio::IAudioMixerPlatformInterface, Audio::FMixerNullCallback, TAsyncRunnable< ResultType >, FInteractiveProcess, FMonitoredProcess, FUdpSocketReceiver, FUdpSocketSender , 以及 FPreLoadScreenSlateThreadTask 内被实现.
|
inlinevirtual |
Stops the runnable object.
This is called if a thread is requested to terminate early.
被 FThreadHeartBeat, FAsyncWriter, FMultichannelTcpReceiver, FMultichannelTcpSender, FInteractiveProcess, FMonitoredProcess, FUdpSocketReceiver , 以及 FUdpSocketSender 重载.