Starts monitoring a process, notifying about its termination. More...
#include <Async.h>
Classes | |
struct | CompletionData |
Completion data for AsyncProcessExit. More... | |
struct | Result |
Callback result for AsyncProcessExit. More... | |
Public Member Functions | |
SC::Result | start (AsyncEventLoop &eventLoop, ProcessDescriptor::Handle process) |
Starts monitoring a process, notifying about its termination. More... | |
Public Member Functions inherited from SC::AsyncRequest | |
void | setDebugName (const char *newDebugName) |
AsyncEventLoop * | getEventLoop () const |
Get the event loop associated with this AsyncRequest. More... | |
void | cacheInternalEventLoop (AsyncEventLoop &loop) |
Caches the event loop associated with this AsyncRequest. More... | |
Result | setThreadPoolAndTask (ThreadPool &pool, AsyncTask &task) |
Sets the thread pool and task to use for this request. More... | |
void | resetThreadPoolAndTask () |
Resets anything previously set with setThreadPoolAndTask. More... | |
AsyncRequest (Type type) | |
Constructs a free async request of given type. More... | |
Result | stop () |
Stops the async operation. More... | |
bool | isFree () const |
Public Attributes | |
Function< void(Result &)> | callback |
Called when process has exited. More... | |
Public Attributes inherited from SC::AsyncRequest | |
AsyncRequest * | next = nullptr |
AsyncRequest * | prev = nullptr |
Friends | |
struct | AsyncEventLoop |
Additional Inherited Members | |
Public Types inherited from SC::AsyncRequest | |
enum class | Type : uint8_t { LoopTimeout , LoopWakeUp , LoopWork , ProcessExit , SocketAccept , SocketConnect , SocketSend , SocketReceive , SocketClose , FileRead , FileWrite , FileClose , FilePoll } |
Type of async request. More... | |
Protected Member Functions inherited from SC::AsyncRequest | |
Result | validateAsync () |
void | queueSubmission (AsyncEventLoop &eventLoop) |
Protected Attributes inherited from SC::AsyncRequest | |
AsyncEventLoop * | eventLoop = nullptr |
AsyncTask * | asyncTask = nullptr |
Starts monitoring a process, notifying about its termination.
Process library can be used to start a process and obtain the native process handle.
SC::Result SC::AsyncProcessExit::start | ( | AsyncEventLoop & | eventLoop, |
ProcessDescriptor::Handle | process | ||
) |
Starts monitoring a process, notifying about its termination.
eventLoop | The event loop where queuing this async request |
process | Native handle of the process that is being monitored |