Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
rustflags = ["--cfg", "tokio_unstable"]
5 changes: 5 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
export DH_VERBOSE = 1
export JEMALLOC_SYS_WITH_MALLOC_CONF = dirty_decay_ms:30000,muzzy_decay_ms:30000,background_thread:true,metadata_thp:auto

# Required by tokio::runtime::Builder::enable_eager_driver_handoff (unstable API).
# The .cargo/config.toml in the source tree is overwritten below in override_dh_auto_build
# to point at vendored sources, so we re-deliver the cfg via RUSTFLAGS here.
export RUSTFLAGS = --cfg tokio_unstable

# Rust installation directory (local install, no network access on Launchpad)
RUST_INSTALL_DIR = $(CURDIR)/rust-local
export PATH := $(RUST_INSTALL_DIR)/bin:$(PATH)
Expand Down
5 changes: 5 additions & 0 deletions pkg/rpm/pg-doorman.spec
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ EOF
# Set jemalloc configuration
export JEMALLOC_SYS_WITH_MALLOC_CONF="dirty_decay_ms:30000,muzzy_decay_ms:30000,background_thread:true,metadata_thp:auto"

# Required by tokio::runtime::Builder::enable_eager_driver_handoff (unstable API).
# The .cargo/config.toml shipped in the source tree is overwritten above to point
# at vendored sources, so we re-deliver the cfg via RUSTFLAGS here.
export RUSTFLAGS="--cfg tokio_unstable"

# Build release binaries
cargo build --release

Expand Down
1 change: 1 addition & 0 deletions src/app/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ pub fn run_server(args: Args, config: Config) -> Result<(), Box<dyn std::error::
runtime_builder
.worker_threads(config.general.worker_threads)
.enable_all()
.enable_eager_driver_handoff()
.thread_name("worker-pg-doorman");

// Apply optional tokio runtime parameters only if explicitly configured.
Expand Down
Loading