forked from Orchid/orchid
reference cycles resolved
This commit is contained in:
@@ -1,16 +1,10 @@
|
||||
use std::mem;
|
||||
use std::rc::Rc;
|
||||
|
||||
use orchid_extension::entrypoint::{ExtensionData, extension_main_logic};
|
||||
use orchid_extension::entrypoint::ExtensionData;
|
||||
use orchid_extension::tokio::tokio_main;
|
||||
use orchid_std::StdSystem;
|
||||
use tokio::task::{LocalSet, spawn_local};
|
||||
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
pub async fn main() {
|
||||
LocalSet::new()
|
||||
.run_until(async {
|
||||
let data = ExtensionData::new("orchid-std::main", &[&StdSystem]);
|
||||
extension_main_logic(data, Rc::new(|fut| mem::drop(spawn_local(fut)))).await;
|
||||
})
|
||||
.await
|
||||
}
|
||||
pub async fn main() { tokio_main(ExtensionData::new("orchid-std::main", &[&StdSystem])).await }
|
||||
|
||||
Reference in New Issue
Block a user