mirror of
https://github.com/denoland/deno.git
synced 2024-12-28 18:19:08 -05:00
161cf7cdfd
This change simplifies how we execute V8. Previously V8 Isolates jumped around threads every time they were woken up. This was overly complex and potentially hurting performance in a myriad ways. Now isolates run on their own dedicated thread and never move. - blocking_json spawns a thread and does not use a thread pool - op_host_poll_worker and op_host_resume_worker are non-operational - removes Worker::get_message and Worker::post_message - ThreadSafeState::workers table contains WorkerChannel entries instead of actual Worker instances. - MainWorker and CompilerWorker are no longer Futures. - The multi-threaded version of deno_core_http_bench was removed. - AyncOps no longer need to be Send + Sync This PR is very large and several tests were disabled to speed integration: - installer_test_local_module_run - installer_test_remote_module_run - _015_duplicate_parallel_import - _026_workers
48 lines
892 B
Rust
48 lines
892 B
Rust
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
|
|
|
#[macro_use]
|
|
extern crate log;
|
|
extern crate futures;
|
|
extern crate libc;
|
|
#[macro_use]
|
|
extern crate downcast_rs;
|
|
extern crate rusty_v8;
|
|
#[macro_use]
|
|
extern crate lazy_static;
|
|
|
|
mod any_error;
|
|
mod bindings;
|
|
mod es_isolate;
|
|
mod flags;
|
|
mod isolate;
|
|
mod js_errors;
|
|
mod module_specifier;
|
|
mod modules;
|
|
mod ops;
|
|
mod plugins;
|
|
mod resources;
|
|
mod shared_queue;
|
|
|
|
use rusty_v8 as v8;
|
|
|
|
pub use crate::any_error::*;
|
|
pub use crate::es_isolate::*;
|
|
pub use crate::flags::v8_set_flags;
|
|
pub use crate::isolate::*;
|
|
pub use crate::js_errors::*;
|
|
pub use crate::module_specifier::*;
|
|
pub use crate::modules::*;
|
|
pub use crate::ops::*;
|
|
pub use crate::plugins::*;
|
|
pub use crate::resources::*;
|
|
|
|
pub fn v8_version() -> &'static str {
|
|
v8::V8::get_version()
|
|
}
|
|
|
|
#[test]
|
|
fn test_v8_version() {
|
|
assert!(v8_version().len() > 3);
|
|
}
|
|
|
|
crate_modules!();
|