Open rneswold opened 1 year ago
Turns out this is more difficult than I thought.
I tried to build a vector of futures which could be run concurrently, but couldn't fix the compile errors. In order to send the outgoing settings, the vector of futures captured some data from self
. I think the core of the run()
method needs to refactored. Maybe the output channels need to be stored as local variables of run()
instead of instance fields of Node
?
This issue is blocked until #89 is finished. There's a risk that, if this was completed first, it would need further work once the other issue was completed.
The main loop of a logic block body is
The problem is that any generated settings are serialized. This loop should build a vector of futures that send the setting and, after all expressions have been processed, resolve the vector of futures at once. If one target device is a little slow, it won't necessarily slow down other devices.
(Of course, this only improves the behavior of logic blocks that have more than one expression.)