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
The PeerSet currently keeps track of some initialization and background tasks necessary for zebra-network. These tasks are spawned in zebra_network::initialize and passed to the PeerSet using a oneshot channel. However, this task handling is something that's not core to the main purpose of the PeerSet (IMHO, I think the main purpose is to route requests to connected peers).
Designs
One idea for refactoring to try to simplify how tasks are handled in the PeerSet is to create a NetworkTasks helper type. A sketch of the idea follows:
This discussion was converted from issue #3190 on February 24, 2022 20:43.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Motivation
The
PeerSet
currently keeps track of some initialization and background tasks necessary forzebra-network
. These tasks are spawned inzebra_network::initialize
and passed to thePeerSet
using aoneshot
channel. However, this task handling is something that's not core to the main purpose of thePeerSet
(IMHO, I think the main purpose is to route requests to connected peers).Designs
One idea for refactoring to try to simplify how tasks are handled in the
PeerSet
is to create aNetworkTasks
helper type. A sketch of the idea follows:The
PeerSet
can just doself.network_tasks.poll()
instead ofself.poll_background_errors()
.Beta Was this translation helpful? Give feedback.
All reactions