Skip to content
Snippets Groups Projects
Commit 482c022e authored by Nick Mathewson's avatar Nick Mathewson :game_die:
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
No related branches found
No related tags found
No related merge requests found
......@@ -411,16 +411,14 @@ impl<R: Runtime> CircMgr<R> {
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
///
/// This function is invoked periodically from the
/// `arti-client` crate, based on timings from the network
/// parameters. As with `launch_timeout_testing_circuit_if_appropriate`, this
/// 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<'_>) {
/// This function is invoked periodically from
/// `continually_preemptively_build_circuits()`.
async fn launch_circuits_preemptively(&self, netdir: DirInfo<'_>) {
debug!("Checking preemptive circuit predictions.");
let (circs, threshold) = {
let preemptive = self.predictor.lock().expect("preemptive lock poisoned");
......@@ -480,17 +478,9 @@ impl<R: Runtime> CircMgr<R> {
///
/// # Note
///
/// This function is invoked periodically from the
/// `arti-client` crate, based on timings from the network
/// parameters. Please don't invoke it on your own; I hope we can
/// 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<()> {
/// This function is invoked periodically from
/// `continually_launch_timeout_testing_circuits`.
fn launch_timeout_testing_circuit_if_appropriate(&self, netdir: &NetDir) -> Result<()> {
if !self.mgr.peek_builder().learning_timeouts() {
return Ok(());
}
......
......@@ -30,6 +30,7 @@ BREAKING: Added `ChanProvenance` to `ChanMgr::get_or_launch`.
### tor-circmgr
MODIFIED: Added a new variant in tor_circmgr::Error.
BREAKING: Made internal scheduled entry points non-public.
### tor-guardmgr
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment