![]() |
dfx 0.1.0
Linux-based dynamic dataflow executor
|
Per-thread runtime metadata associated with a ThreadPool worker. More...
#include <dfx-runtime/ThreadData.hpp>
Public Member Functions | |
| ThreadData (std::thread::id id) | |
| Construct thread data for a specific worker thread. | |
Public Attributes | |
| std::thread::id const | tid |
| Thread identifier of the owning worker. | |
| uint32_t | nestedLevel = 0 |
| Current inline execution depth. | |
Per-thread runtime metadata associated with a ThreadPool worker.
ThreadData stores lightweight, thread-local runtime information for threads managed by the dfx runtime (most notably ThreadPool workers).
An instance of ThreadData is:
Access to this structure is mediated by the owning ThreadPool via the threadData() helpers. Threads that do not belong to the pool have no associated ThreadData.
Consumers should therefore:
|
inline |
Construct thread data for a specific worker thread.
| id | Thread identifier of the owning worker. |
| uint32_t dfx::Runtime::ThreadData::nestedLevel = 0 |
Current inline execution depth.
Counts how many inline calls have been performed consecutively by this thread. When this value exceeds a runtime-defined limit, execution should be deferred instead of continuing inline.
This is used to protect the runtime against unbounded recursion in deeply nested or cyclic dataflow graphs:
This mechanism prevents stack overflows while preserving fast-path execution for shallow call chains.
| std::thread::id const dfx::Runtime::ThreadData::tid |
Thread identifier of the owning worker.