1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

use upper case name for static variable c_rid (#1537)

This commit is contained in:
wangcong 2019-01-16 23:27:17 +08:00 committed by Ryan Dahl
parent 0afc698d25
commit bc22dca2aa

View file

@ -13,7 +13,7 @@ use std::sync::Arc;
use std::sync::Mutex;
lazy_static! {
static ref c_rid: Mutex<Option<ResourceId>> = Mutex::new(None);
static ref C_RID: Mutex<Option<ResourceId>> = Mutex::new(None);
}
// This corresponds to JS ModuleMetaData.
@ -80,7 +80,7 @@ impl CodeFetchOutput {
}
fn lazy_start(parent_state: &Arc<IsolateState>) -> Resource {
let mut cell = c_rid.lock().unwrap();
let mut cell = C_RID.lock().unwrap();
let rid = cell.get_or_insert_with(|| {
let resource =
workers::spawn(parent_state.clone(), "compilerMain()".to_string());