Commit 482c022e authored by Nick Mathewson's avatar Nick Mathewson 🦞
Browse files

circmgr: Remove now-unused scheduled entry points.

Now that we have TaskSchedule, we don't need to expose these any
longer.
parent 3d5276a9
Loading
Loading
Loading
Loading
+8 −18
Original line number Original line Diff line number Diff line
@@ -411,16 +411,14 @@ impl<R: Runtime> CircMgr<R> {
        self.mgr.get_or_launch(&usage, netdir).await.map(|(c, _)| c)
        self.mgr.get_or_launch(&usage, netdir).await.map(|(c, _)| c)
    }
    }


    /// Launch circuits preemptively, using the preemptive circuit predictor's predictions.
    /// Launch circuits preemptively, using the preemptive circuit predictor's
    /// predictions.
    ///
    ///
    /// # Note
    /// # Note
    ///
    ///
    /// This function is invoked periodically from the
    /// This function is invoked periodically from
    /// `arti-client` crate, based on timings from the network
    /// `continually_preemptively_build_circuits()`.
    /// parameters. As with `launch_timeout_testing_circuit_if_appropriate`, this
    async fn launch_circuits_preemptively(&self, netdir: DirInfo<'_>) {
    /// should ideally be refactored to be internal to this crate, and not be a
    /// public API here.
    pub async fn launch_circuits_preemptively(&self, netdir: DirInfo<'_>) {
        debug!("Checking preemptive circuit predictions.");
        debug!("Checking preemptive circuit predictions.");
        let (circs, threshold) = {
        let (circs, threshold) = {
            let preemptive = self.predictor.lock().expect("preemptive lock poisoned");
            let preemptive = self.predictor.lock().expect("preemptive lock poisoned");
@@ -480,17 +478,9 @@ impl<R: Runtime> CircMgr<R> {
    ///
    ///
    /// # Note
    /// # Note
    ///
    ///
    /// This function is invoked periodically from the
    /// This function is invoked periodically from
    /// `arti-client` crate, based on timings from the network
    /// `continually_launch_timeout_testing_circuits`.
    /// parameters.  Please don't invoke it on your own; I hope we can
    fn launch_timeout_testing_circuit_if_appropriate(&self, netdir: &NetDir) -> Result<()> {
    /// have this API go away in the future.
    ///
    /// I would much prefer to have this _not_ be a public API, and
    /// instead have it be a daemon task.  The trouble is that it
    /// needs to get a NetDir as input, and that isn't possible with
    /// the current CircMgr design.  See
    /// [arti#161](https://gitlab.torproject.org/tpo/core/arti/-/issues/161).
    pub fn launch_timeout_testing_circuit_if_appropriate(&self, netdir: &NetDir) -> Result<()> {
        if !self.mgr.peek_builder().learning_timeouts() {
        if !self.mgr.peek_builder().learning_timeouts() {
            return Ok(());
            return Ok(());
        }
        }
+1 −0
Original line number Original line Diff line number Diff line
@@ -30,6 +30,7 @@ BREAKING: Added `ChanProvenance` to `ChanMgr::get_or_launch`.
### tor-circmgr
### tor-circmgr


MODIFIED: Added a new variant in tor_circmgr::Error.
MODIFIED: Added a new variant in tor_circmgr::Error.
BREAKING: Made internal scheduled entry points non-public.


### tor-guardmgr
### tor-guardmgr