Class ProcessChain¶
Defined in File processchain.hpp
Class Documentation¶
-
class
legion::core::scheduling
::
ProcessChain
¶ Chain of processes that either run in a separate thread or on the main thread.
- Note
If chain is to run on a separate thread, then the chain has it’s own program loop. ProcessChain::exit() needs to be called in order to end the thread.
Public Functions
-
ProcessChain
() = default¶
-
ProcessChain
(ProcessChain&&) = default¶
-
ProcessChain &
operator=
(ProcessChain&&) = default¶
-
bool
run
(bool low_power)¶ Creates a new thread and runs it’s own program loop in it.
-
inline std::thread::id
threadId
()¶ Get id of the thread the chain runs on.
-
void
exit
()¶ Raises exit flag for this process-chain and will request the process thread to exit.
-
void
runInCurrentThread
()¶ Runs one iteration of the process-chains program loop without creating a new thread.
- Note
Loops through all hooked processes and executes them until they are all finished.
Public Static Functions
-
static void
threadedRun
(ProcessChain *chain)¶
-
template<void(*)() func> static inline void subscribeToChainStart ()
-
template<void(*)() func> static inline void subscribeToChainEnd ()
-
template<void(*)() func> static inline void unsubscribeFromChainStart ()
-
template<void(*)() func> static inline void unsubscribeFromChainEnd ()