Remove --current-thread flag (#3830)

This flag was added to evaluate performance relative to tokio's threaded
runtime. Although it's faster in the HTTP benchmark, it's clear the runtime
is not the only perf problem.

Removing this flag will simplify further refactors, in particular
adopting the #[tokio::main] macro. This will be done in a follow up.

Ultimately we expect to move to the current thread runtime with Isolates
pinned to specific threads, but that will be a much larger refactor. The
--current-thread just complicates that effort.
This commit is contained in:
Ryan Dahl 2020-01-30 10:49:33 -05:00 committed by GitHub
parent 51089836eb
commit 2338e7679c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 1 additions and 64 deletions

View file

@ -15,16 +15,3 @@ where
.expect("Unable to create Tokio runtime");
rt.block_on(future);
}
pub fn run_on_current_thread<F>(future: F)
where
F: Future<Output = ()> + Send + 'static,
{
let mut rt = runtime::Builder::new()
.basic_scheduler()
.enable_all()
.thread_name("deno")
.build()
.expect("Unable to create Tokio runtime");
rt.block_on(future);
}