Search Unity

Consumer/producer with no dependency waiting

Discussion in 'Entity Component System' started by snacktime, Sep 3, 2021.

  1. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    The flow is producer/consumer between systems with batches of data. Requirements are that the flow not create job dependencies between systems. More specifically it's too much work to have consumers waiting/completing batch creation, and consumers don't need data the same frame it was produced.

    So the usual pattern here is batch level synchronization which is acceptable, it's 4 synchronizations total per frame per producer/consumer pair which isn't really significant. but I'm wondering if there is maybe some usage of NativeStream that would work for this? I don't think so but thought I'd check.