diff --git a/db/testutil.rs b/db/testutil.rs index bce0231..9f42cb7 100644 --- a/db/testutil.rs +++ b/db/testutil.rs @@ -35,14 +35,14 @@ use fnv::FnvHashMap; use mylog; use rusqlite; use std::env; -use std::sync::{self, Arc}; +use std::sync::Arc; use std::thread; use tempdir::TempDir; use time; use uuid::Uuid; use crate::writer; -static INIT: sync::Once = sync::ONCE_INIT; +static INIT: parking_lot::Once = parking_lot::Once::new(); /// id of the camera created by `TestDb::new` below. pub const TEST_CAMERA_ID: i32 = 1; diff --git a/src/stream.rs b/src/stream.rs index e8a3440..a617bc0 100644 --- a/src/stream.rs +++ b/src/stream.rs @@ -36,9 +36,8 @@ use lazy_static::lazy_static; use log::{debug, info, warn}; use std::ffi::CString; use std::result::Result; -use std::sync; -static START: sync::Once = sync::ONCE_INIT; +static START: parking_lot::Once = parking_lot::Once::new(); lazy_static! { pub static ref FFMPEG: Ffmpeg = Ffmpeg::new();