mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 02:22:40 +00:00
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:
parent
51089836eb
commit
2338e7679c
6 changed files with 1 additions and 64 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue