mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2024-12-26 23:25:55 -05:00
stop using sync::ONCE_INIT
This addressed a deprecation warning on nightly (will be in Rust 1.38). Use parking_lot instead, which in theory is faster (although I doubt it's significant here).
This commit is contained in:
parent
433be217ac
commit
fe575e1b63
@ -35,14 +35,14 @@ use fnv::FnvHashMap;
|
|||||||
use mylog;
|
use mylog;
|
||||||
use rusqlite;
|
use rusqlite;
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::sync::{self, Arc};
|
use std::sync::Arc;
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use tempdir::TempDir;
|
use tempdir::TempDir;
|
||||||
use time;
|
use time;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
use crate::writer;
|
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.
|
/// id of the camera created by `TestDb::new` below.
|
||||||
pub const TEST_CAMERA_ID: i32 = 1;
|
pub const TEST_CAMERA_ID: i32 = 1;
|
||||||
|
@ -36,9 +36,8 @@ use lazy_static::lazy_static;
|
|||||||
use log::{debug, info, warn};
|
use log::{debug, info, warn};
|
||||||
use std::ffi::CString;
|
use std::ffi::CString;
|
||||||
use std::result::Result;
|
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! {
|
lazy_static! {
|
||||||
pub static ref FFMPEG: Ffmpeg = Ffmpeg::new();
|
pub static ref FFMPEG: Ffmpeg = Ffmpeg::new();
|
||||||
|
Loading…
Reference in New Issue
Block a user