aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 93abcca..5ccc2fc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -24,9 +24,12 @@ mod tls_util;
pub use df_consul as consul;
use proxy_config::ProxyConfig;
-#[cfg(feature = "dhat-heap")]
+#[cfg(not(target_env = "msvc"))]
+use tikv_jemallocator::Jemalloc;
+
+#[cfg(not(target_env = "msvc"))]
#[global_allocator]
-static ALLOC: dhat::Alloc = dhat::Alloc;
+static GLOBAL: Jemalloc = Jemalloc;
#[derive(StructOpt, Debug)]
#[structopt(name = "tricot")]
@@ -110,6 +113,7 @@ struct Opt {
pub warmup_cert_memory_store: bool,
}
+
#[tokio::main(flavor = "multi_thread", worker_threads = 10)]
async fn main() {
#[cfg(feature = "dhat-heap")]
@@ -210,7 +214,8 @@ async fn main() {
.then(|_| async { info!("HTTPS server exited") }),
);
- let dump_task = tokio::spawn(dump_config_on_change(rx_proxy_config, exit_signal.clone()));
+ let dump_task = tokio::spawn(dump_config_on_change(rx_proxy_config, exit_signal.clone()));
+
metrics_task.await.expect("Tokio task await failure");
http_task.await.expect("Tokio task await failure");