cwfitzgerald / fiber-tasking-library

A library for enabling task-based multi-threading. It allows execution of task graphs with arbitrary dependencies.
Apache License 2.0
0 stars 1 forks source link

Let tasks depend on each other #4

Open DethRaid opened 5 years ago

DethRaid commented 5 years ago

Possibly related to #1

I'd like a way for tasks to depend on other tasks. Right now I can render geometry and upload new mesh data to staging buffers at the same time, but the task to copy data from the staging buffers to the main mesh buffer needs to wait on both those tasks. I can use AtomicCounters to accomplish this, but I'd like something a bit more formalized

DethRaid commented 5 years ago

It'd be great to be able to say task.when_complete(task_to_perform), and be able to override what it means for a task to be complete - some of mine are complete when the CPU finishes executing them, some are complete when the GPU is done with its work