pub fn object_init(dev: Arc<Mutex<Balloon>>) {
        // Safe, because there is no confliction when writing global variable BALLOON_DEV, in other words,
        // this function will not be called simultaneously.
        unsafe {
            if BALLOON_DEV.is_none() {
                BALLOON_DEV = Some(dev)
            }
        }
    }
/// Init balloon object for global use.
Init balloon object for global use.
Init balloon object for global use .
pub fn object_init(dev: Arc<Mutex<Balloon>>) {
        // Safe, because there is no confliction when writing global variable BALLOON_DEV, in other words,
        // this function will not be called simultaneously.
        unsafe {
            if BALLOON_DEV.is_none() {
                BALLOON_DEV = Some(dev)
            }
        }
    }
pub fn object_init ( dev : Arc < Mutex < Balloon > > ) { // Safe, because there is no confliction when writing global variable BALLOON_DEV, in other words, // this function will not be called simultaneously. unsafe { if BALLOON_DEV . is_none ( ) { BALLOON_DEV = Some ( dev ) } } }
Init balloon object for global use.
Init balloon object for global use .
dev
Arc<Mutex<Balloon>>
dev
Arc<Mutex<Balloon>>