cginternals / cginternals/gloperate
Asynchronous Stages
- Dominant language
- C++
- Stars
- 43
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
Theoretically, `Stage`'s algorithms can be executed asynchronously.
The process would be:
- If the process of a stage is called, start a new thread and return with unchanged outputs
- When the thread has computed the results, store them to the output values and invalidate them, so that later stages gets invalidated
There are three crucial points with this approach:
- The output of an asynchronous stage mustn't be set while a later stage reads from these values (critical section, shared mutex?)
- A changed input has to stop the current thread and the current results have to be discarded (killing threads?)
- The asynchronous thread mustn't read from the input while a former stage writes it (critical section, shared mutex?)
Some of these issues can be additonally improved with section marks of inputs and outputs as critical section, one at a time (e.g., by defining InputSlot ranges that can be updated individually).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how Stage algorithms are invoked and how their input and output values are read or invalidated. The issue proposes asynchronous execution and mentions InputSlot ranges, shared mutexes, cancellation, and critical sections, but does not define the required concurrency model or a concrete completion test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100