summaryrefslogtreecommitdiff
path: root/cli/flags.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-01-30 10:49:33 -0500
committerGitHub <noreply@github.com>2020-01-30 10:49:33 -0500
commit2338e7679c8840314642dbf3ea838908f5f35d3c (patch)
treefd8a56d12bc84167e306fb7fdf71a32ab86362ad /cli/flags.rs
parent51089836eb835d6b4cc03653dcb0b7a281017157 (diff)
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.
Diffstat (limited to 'cli/flags.rs')
-rw-r--r--cli/flags.rs25
1 files changed, 0 insertions, 25 deletions
diff --git a/cli/flags.rs b/cli/flags.rs
index eaf9b7fc5..d7a95d79e 100644
--- a/cli/flags.rs
+++ b/cli/flags.rs
@@ -85,8 +85,6 @@ pub struct DenoFlags {
pub cached_only: bool,
pub seed: Option<u64>,
pub v8_flags: Option<Vec<String>>,
- // Use tokio::runtime::current_thread
- pub current_thread: bool,
pub bundle_output: Option<String>,
@@ -438,10 +436,6 @@ fn run_test_args_parse(flags: &mut DenoFlags, matches: &clap::ArgMatches) {
flags.cached_only = true;
}
- if matches.is_present("current-thread") {
- flags.current_thread = true;
- }
-
if matches.is_present("seed") {
let seed_string = matches.value_of("seed").unwrap();
let seed = seed_string.parse::<u64>().unwrap();
@@ -755,11 +749,6 @@ fn run_test_args<'a, 'b>(app: App<'a, 'b>) -> App<'a, 'b> {
.help("Require that remote dependencies are already cached"),
)
.arg(
- Arg::with_name("current-thread")
- .long("current-thread")
- .help("Use tokio::runtime::current_thread"),
- )
- .arg(
Arg::with_name("seed")
.long("seed")
.value_name("NUMBER")
@@ -1874,20 +1863,6 @@ mod tests {
}
#[test]
- fn current_thread() {
- let r = flags_from_vec_safe(svec!["deno", "--current-thread", "script.ts"]);
- assert_eq!(
- r.unwrap(),
- DenoFlags {
- subcommand: DenoSubcommand::Run,
- argv: svec!["deno", "script.ts"],
- current_thread: true,
- ..DenoFlags::default()
- }
- );
- }
-
- #[test]
fn allow_net_whitelist_with_ports() {
let r = flags_from_vec_safe(svec![
"deno",