You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the things that's hurting Rust's performance in that particular benchmark is that the accept loop is running directly inside a call to block_on. This can be a performance problem because a tokio::spawn task will never run on the same thread as a block_on task, which means that all connections must be transferred to another Tokio thread before they can be processed.
As far as I understand the code, I think that we're good here, but I just want to make sure it's how I understand it.
The main is using block_on as excepted:
let runtime = builder.build()?;
runtime.block_on(Executable::builder().start())
This is waiting for RouterHttpServer
let router = RouterHttpServer::builder().is_telemetry_disabled(opt.is_telemetry_disabled()).configuration(configuration).and_uplink(uplink_config).schema(schema_source).license(license).shutdown(shutdown.unwrap_or(ShutdownSource::CtrlC)).start();ifletErr(err) = router.await{
and this is using spawn:
let listen_addresses = state_machine.listen_addresses.clone();let result = spawn(asyncmove{ state_machine.process_events(event_stream).await}.with_current_subscriber(),)
The text was updated successfully, but these errors were encountered:
From https://users.rust-lang.org/t/why-tonic-not-good-in-beckmark-of-multi-core/70025/6
As far as I understand the code, I think that we're good here, but I just want to make sure it's how I understand it.
The main is using
block_on
as excepted:This is waiting for
RouterHttpServer
and this is using
spawn
:The text was updated successfully, but these errors were encountered: