Skip to content

Make daemon tasks self-contained; introduce NetDirProvider

eta requested to merge eta/arti:daemon-separation into main

The various background daemon tasks that arti-client used to spawn are now handled inside their respective crates instead, with functions provided to spawn them that return TaskHandles.

This required introducing a new trait, NetDirProvider, which steals some functionality from the DirProvider trait to enable tor-circmgr to depend on it (tor-circmgr is a dependency of tor-dirmgr, so it can't depend on DirProvider directly).

While we're at it, we also make some of the tasks wait for events from the NetDirProvider instead of sleeping, slightly increasing efficiency.

Merge request reports