Skip to content

Suggestion: Producer/Consumer #23

Open
@miguelmartin75

Description

Just watched your talk and looked at your particle example. Good job on the library. I didn't really think of system logic being an (implicit) DAG (though one could interpret it as it having a cycle due to the game loop) which is neat.

On to the point of this issue. I have a small suggestion, though I'm not sure how feasible it is or if it is really all that necessary, but I figured I would suggest it anyway.

From my understanding a system can output data that other system(s) can consume (not sure if a set of systems can consume data from one producing system). However, from my observations, this approach requires the system producing the data to produce all of the data before any other system(s) that depend on this data to do any work.

To my knowledge, this problem is exactly the generalised producer/consumer problem. Note that multiple producers could obviously be created from inner parallelism (perhaps other ways too) and multiple consumers from multiple subscribers to the data.

To my belief, having this implemented can further increase the potential to utilise all cores of a system, as if the producer(s) and consumer(s) are only dependent on the shared data they can be ran concurrently (by only providing synchronisation over the shared data to implement the problem).

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions