pub fn glutin_thread() -> Arc<GlutinThread> {
    GLUTIN_THREAD.sync(|thread| {
        if let Some(thread) = thread {
            // Thread is already running
            Arc::clone(thread)
        } else {
            // Need to start a new thread
            let new_thread  = create_glutin_thread();
            *thread         = Some(Arc::clone(&new_thread));

            new_thread
        }
    })
}
///
/// Creates or retrieves the glutin thread
///
Creates or retrieves the glutin thread
Creates or retrieves the glutin thread
pub fn glutin_thread() -> Arc<GlutinThread> {
    GLUTIN_THREAD.sync(|thread| {
        if let Some(thread) = thread {
            // Thread is already running
            Arc::clone(thread)
        } else {
            // Need to start a new thread
            let new_thread  = create_glutin_thread();
            *thread         = Some(Arc::clone(&new_thread));
            new_thread
        }
    })
}
pub fn glutin_thread ( ) -> Arc < GlutinThread > { GLUTIN_THREAD . sync ( | thread | { if let Some ( thread ) = thread { // Thread is already running Arc :: clone ( thread ) } else { // Need to start a new thread let new_thread = create_glutin_thread ( ) ; * thread = Some ( Arc :: clone ( & new_thread ) ) ; new_thread } } ) }
Creates or retrieves the glutin thread
Creates or retrieves the glutin thread