1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
pub mod channels;
mod context;
pub mod core;
mod responses;
pub mod widgets;
pub use crate::context::{Assets, Context};
pub(crate) use responses::{
LayerChannelReceiver, LayerChannelSender, LayerInstructions, LayerNummerId,
WidgetChannelReceiver, WidgetChannelSender, WidgetInstruction, WidgetNummerId,
};
pub use responses::{LayerId, Response, WidgetId};
use std::sync::{Arc, Mutex, MutexGuard};
pub(crate) fn force_mutex<T>(val: &Arc<Mutex<T>>) -> MutexGuard<T> {
val.lock().unwrap_or_else(|v| v.into_inner())
}