mirror of
https://github.com/jwinterm/grim.git
synced 2026-11-28 08:53:54 +01:00
async: use tokio for thread block calls
This commit is contained in:
@@ -78,7 +78,7 @@ impl ExternalConnection {
|
||||
}
|
||||
}
|
||||
|
||||
/// Check external connections availability.
|
||||
/// Check external connection availability.
|
||||
pub fn check(id: Option<i64>, ui_ctx: &egui::Context) {
|
||||
let conn_list = ConnectionsConfig::ext_conn_list();
|
||||
for conn in conn_list {
|
||||
@@ -99,7 +99,7 @@ fn check_ext_conn(conn: &ExternalConnection, ui_ctx: &egui::Context) {
|
||||
let ui_ctx = ui_ctx.clone();
|
||||
ConnectionsConfig::update_ext_conn_status(conn.id, None);
|
||||
std::thread::spawn(move || {
|
||||
tokio::runtime::Builder::new_multi_thread()
|
||||
tokio::runtime::Builder::new_current_thread()
|
||||
.enable_all()
|
||||
.build()
|
||||
.unwrap()
|
||||
|
||||
Reference in New Issue
Block a user