You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
message_forwarding: Change call_slave_... functions to reduce repetition (#6321)
These functions were calling remote functions with rpc and session_id as
unnamed parameters. Because the remote functions always gave these two
parameters named, it required closures throughout the file to fix this
inconsistency.
This creates a lot of unnecessary code. Change the situation by making
call_slave_... functions to call the functions using named parameters,
and group the local and remote functions whenever a chain
to_call_slave_... is initiated so it's easy to verify that the calls are
correct.
Most of the callers use the same name for both local and remote
functions, but there are some interesting cases that can be easily seen
now: pool_eject always uses the same remote function for 3 different
types of members in the pool, previously 3 different closures were
created and the code had to be careful with names to not confuse the
ejected host from the ejectors.
When starting a vm, the local function is start_on, while the remote
function is start, the formers needs an additional host parameter, when
compared to the latter.
A lot of functions in message_forwarding look very regular, this may
lead to a chance to further reduce glue code, or even generate the code?
0 commit comments