1
0
Fork 0
forked from wry/wry

config: add async tasks and polling infrastructure

This commit is contained in:
Julian Orth 2024-03-05 18:28:15 +01:00
parent 7fb68561e8
commit d4d76c0ef3
13 changed files with 613 additions and 13 deletions

View file

@ -16,6 +16,20 @@ macro_rules! config {
};
}
macro_rules! try_get {
() => {{
#[allow(unused_unsafe)]
unsafe {
let client = crate::_private::client::CLIENT.with(|client| client.get());
if client.is_null() {
None
} else {
Some(&*client)
}
}
}};
}
macro_rules! get {
() => {{
get!(Default::default())