config: add async tasks and polling infrastructure
This commit is contained in:
parent
7fb68561e8
commit
d4d76c0ef3
13 changed files with 613 additions and 13 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue