So just to sum up a bit
- Messaging should only take / return one argument (if server is omitted) : the byte package / the data passed
- Filtering conditions based on
data
may be performed inside or outside ofcomputeSomething
as convenience. - Variables that should be accessible in the main loop should be so through an appropriate container. For instance
mutable struct MyOverallContainer
data1::Data1
data2::Data2
result1::Result1
end
Which would then be passed and modified by each computeSomething
call.
By the way I think this would not work for me because all of my structures are actually immutables so I wouldn’t know how to initialize this starting MyOverallContainer
, but a Dict
would surely work.
Do you agree with this summary ?
Yeah, that was my plan, but I just came up with this code like few hours of work ago, so understanding was the priority.