12-29-2022 10:50 AM
I'll say that DVRs are generally not a good way to pass data between loops, especially if you have multiple loops trying to write to the same data. I would be more inclined to use a Queue or Notifier to pass your raw data to this loop and then you can process it as needed. The processed data could be sent on similarly usings Queue(s) and/or Notifier(s), depending on the number of loops and what those other loops are doing.
12-29-2022 11:25 AM - edited 12-29-2022 11:26 AM
@crossrulz wrote:
I'll say that DVRs are generally not a good way to pass data between loops, especially if you have multiple loops trying to write to the same data.
The nice thing about DVRs is that they don't "pass data", but all point to the same data (semantics... 😄 ). I agree they are rarely needed, though. I think I only used them once where I had to share a huge 3D arrays, avoiding some data copies.
12-29-2022 12:35 PM
@crossrulz wrote:
I'll say that DVRs are generally not a good way to pass data between loops, especially if you have multiple loops trying to write to the same data. I would be more inclined to use a Queue or Notifier to pass your raw data to this loop and then you can process it as needed. The processed data could be sent on similarly usings Queue(s) and/or Notifier(s), depending on the number of loops and what those other loops are doing.
This might even be a good use case for a Channel Wire object. Depending on the degree of access desired by multiple loops.
However, a DVR to point at 24 clusters of data smells like a God Object from here! I would seriously rethink what subvis are doing to what data elements. And refactor while there is still time.