Issue 1:
We've been adding a bunch of sync file system ops (aka handlers) recently - for example deno.statSync. We want to have async thread pool versions of these ops but we would like to do it without fully duplicating all of the existing code.

This will require a relatively invasive refactoring of how we structure handlers.rs, so that we're mapping messages to Rust futures instead of to functions. Then we should leverage https://tokio-rs.github.io/tokio/tokio_fs

This is more of an umbrella issue - it will likely take several smaller refactors to get there.

Issue 2:
👋 trying to build the latest release, but run into some build issue. The error log is as below:

build failure

==> cargo install -vv --locked --root /usr/local/Cellar/deno/1.5.4 --path .
Installing deno v1.5.4 (/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli)
Updating crates.io index
Downloading crates ...
Downloaded ansi_term v0.11.0
Downloaded alloc-stdlib v0.2.1
Downloaded anyhow v1.0.32
Downloaded anymap v0.12.1
Downloaded arrayvec v0.5.1
Downloaded build_const v0.2.1
Downloaded httparse v1.3.4
Downloaded ident_case v1.0.1
Downloaded jsonc-parser v0.14.0
Downloaded lazy_static v1.4.0
Downloaded radix_fmt v1.0.0
Downloaded quote v1.0.7
Downloaded rand_core v0.5.1
Downloaded proc-macro2 v0.4.30
Downloaded phf v0.8.0
Downloaded swc_atoms v0.2.5
Downloaded swc_ecma_ast v0.35.0
Downloaded swc_ecma_dep_graph v0.9.0
Downloaded swc_ecma_codegen_macros v0.5.0
Downloaded swc_ecma_parser_macros v0.4.1
Downloaded swc_ecma_parser v0.43.1
Downloaded thiserror v1.0.20
Downloaded tokio-tungstenite v0.11.0
Downloaded tungstenite v0.11.1
Downloaded tracing v0.1.19
Downloaded swc_ecma_codegen v0.41.1
Downloaded utf8parse v0.2.0
Downloaded twoway v0.1.8
Downloaded termcolor v1.1.0
Downloaded rand_xorshift v0.1.1
Downloaded remove_dir_all v0.5.3
Downloaded unicode-xid v0.1.0
Downloaded unicode-xid v0.2.1
Downloaded unicode-bidi v0.3.4
Downloaded walkdir v2.3.1
Downloaded rand_isaac v0.1.1
Downloaded version_check v0.9.2
Downloaded which v4.0.2
Downloaded futures v0.3.8
Downloaded tracing-core v0.1.16
Downloaded thiserror-impl v1.0.20
Downloaded sys-info v0.7.0
Downloaded semver v0.9.0
Downloaded serde_derive v1.0.117
Downloaded unicode-width v0.1.8
Downloaded want v0.3.0
Downloaded vec_map v0.8.2
Downloaded url v2.1.1
Downloaded ast_node v0.7.0
Downloaded strsim v0.9.3
Downloaded brotli-decompressor v2.3.1
Downloaded unicode-segmentation v1.6.0
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli/rt/40_write_file.js
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli/rt/41_prompt.js
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli/rt/90_deno_ns.js
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli/rt/99_main.js
[deno 1.5.4] Snapshot size: 248015
[deno 1.5.4] Snapshot written to: /private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/build/deno-af2aaf340dbef92c/out/CLI_SNAPSHOT.bin
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/op_crates/fetch/lib.deno_fetch.d.ts
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/op_crates/web/lib.deno_web.d.ts
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli/tsc/00_typescript.js
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli/tsc/99_main_compiler.js
[deno 1.5.4] Snapshot size: 3778336
[deno 1.5.4] Snapshot written to: /private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/build/deno-af2aaf340dbef92c/out/COMPILER_SNAPSHOT.bin
Running `CARGO=/usr/local/Cellar/rust/1.47.0/bin/cargo CARGO_BIN_NAME=deno CARGO_CRATE_NAME=deno CARGO_MANIFEST_DIR=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli CARGO_PKG_AUTHORS='the Deno authors' CARGO_PKG_DESCRIPTION='Provides the deno executable' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=MIT CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=deno CARGO_PKG_REPOSITORY='https://github.com/denoland/deno' CARGO_PKG_VERSION=1.5.4 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=5 CARGO_PKG_VERSION_PATCH=4 CARGO_PKG_VERSION_PRE='' DENO_FETCH_LIB_PATH=/private/tmp/deno-20201123-87041-1pvuv3v/deno/op_crates/fetch/lib.deno_fetch.d.ts DENO_WEB_LIB_PATH=/private/tmp/deno-20201123-87041-1pvuv3v/deno/op_crates/web/lib.deno_web.d.ts DYLD_FALLBACK_LIBRARY_PATH='/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps:/usr/local/Cellar/rust/1.47.0/lib:/private/tmp/deno-20201123-87041-1pvuv3v/deno/.brew_home/lib:/usr/local/lib:/usr/lib' GIT_COMMIT_HASH=UNKNOWN OUT_DIR=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/build/deno-af2aaf340dbef92c/out PROFILE=release TARGET=x86_64-apple-darwin TS_VERSION=4.0.5 rustc --crate-name deno --edition=2018 cli/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=z -C lto -C codegen-units=1 -C metadata=165ba8ab1ba1d38d --out-dir /private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps -L dependency=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps --extern atty=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libatty-20b66de07789d749.rlib --extern base64=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libbase64-ae4a39f942b63d83.rlib --extern byteorder=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libbyteorder-a02c326dacd510de.rlib --extern bytes=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libbytes-cdb77ed40c3f20da.rlib --extern clap=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libclap-b68f524a56e40375.rlib --extern deno_core=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdeno_core-c8ffd184beebca4e.rlib --extern deno_crypto=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdeno_crypto-8893240ebb97195b.rlib --extern deno_doc=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdeno_doc-befd20d2a45638e6.rlib --extern deno_fetch=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdeno_fetch-8c5082cd83625c5f.rlib --extern deno_lint=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdeno_lint-85d01310a14b6714.rlib --extern deno_web=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdeno_web-9f658289b1c80dd9.rlib --extern dissimilar=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdissimilar-d697b9c0bd9b4fe6.rlib --extern dlopen=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdlopen-aa0ac04e6c9e5fc0.rlib --extern dprint_plugin_typescript=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdprint_plugin_typescript-57e2ae62bb59e569.rlib --extern encoding_rs=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libencoding_rs-7c26bc9b7cd278c1.rlib --extern env_logger=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libenv_logger-b23256893e067e90.rlib --extern filetime=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libfiletime-07d1cba529ccab3e.rlib --extern http=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libhttp-94b731f7df1fabd6.rlib --extern indexmap=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libindexmap-c5dda75742f97961.rlib --extern jsonc_parser=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libjsonc_parser-64f536e0111f9be7.rlib --extern lazy_static=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/liblazy_static-7d55e14227559b10.rlib --extern libc=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/liblibc-3c8d6c61c371644a.rlib --extern log=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/liblog-d4d4834fe7f105a4.rlib --extern nix=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libnix-d53870a050fb4514.rlib --extern notify=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libnotify-7a23aa918afb3a6e.rlib --extern regex=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libregex-ca50c1844ad9f396.rlib --extern ring=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libring-f8ffb0801317b4b0.rlib --extern rustyline=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/librustyline-9b33c0e5f5bbe657.rlib --extern rustyline_derive=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/librustyline_derive-0776e1c7d36d685a.dylib --extern semver_parser=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libsemver_parser-a2420ecdcf5147a9.rlib --extern serde=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libserde-ffb52ad7e93267e2.rlib --extern shell_escape=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libshell_escape-93357b23638193a0.rlib --extern sourcemap=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libsourcemap-1ac99f1875db4fc2.rlib --extern swc_bundler=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libswc_bundler-0230797263c39558.rlib --extern swc_common=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libswc_common-069db6614df3ab7e.rlib --extern swc_ecmascript=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libswc_ecmascript-e99e2e396ede5280.rlib --extern sys_info=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libsys_info-b031f4217ef84e8c.rlib --extern tempfile=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libtempfile-cbb9f08abbd96265.rlib --extern termcolor=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libtermcolor-e4c5c7ac99092628.rlib --extern tokio=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libtokio-e9c54cd463732ba5.rlib --extern tokio_rustls=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libtokio_rustls-23d2e4f4dac8aeb6.rlib --extern tokio_tungstenite=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libtokio_tungstenite-494c43b10abe55b2.rlib --extern uuid=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libuuid-5897cbdfc25ef384.rlib --extern walkdir=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libwalkdir-aeabd126e18d3657.rlib --extern warp=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libwarp-c913e1c74cf69809.rlib --extern webpki=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libwebpki-81a4428069577e7c.rlib --extern webpki_roots=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libwebpki_roots-681040ca67c32fef.rlib -L native=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/gn_out/obj/ -L native=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/build/ring-2255df34cb1dfae4/out -L native=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/build/sys-info-503200fc000ab196/out`
Finished release [optimized] target(s) in 70m 11s
Installing /usr/local/Cellar/deno/1.5.4/bin/deno
Installed package `deno v1.5.4 (/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli)` (executable `deno`)
warning: be sure to add `/usr/local/Cellar/deno/1.5.4/bin` to your PATH to be able to run the installed binaries

Full build log is here, https://github.com/Homebrew/homebrew-core/runs/1443285079

relates to Homebrew/homebrew-core#65517