wip: threadsafe

This commit is contained in:
Jonathan Kelley committed 2021-10-01 02:07:12 -04:00
1 parent 71f0df6374
commit 82953f2ac3
22 files changed
+414 -545

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
use dioxus_core as dioxus;
use dioxus_core::prelude::*;
use dioxus_core_macro::*;
use dioxus_html as dioxus_elements;
fn main() {
std::thread::spawn(|| {
let mut vdom = VirtualDom::new(App);
let f = async_std::task::block_on(vdom.wait_for_work());
});
let a = 10;
// async_std::task::spawn_blocking(|| async move {
// });
}
static App: FC<()> = |cx, props| {
//
cx.render(rsx!(
div {
"hello world!"
}
))
};
-16
View File
@@ -1,16 +0,0 @@
use dioxus_core as dioxus;
use dioxus_core::prelude::*;
use dioxus_html as dioxus_elements;
fn main() {
dioxus_desktop::launch(App, |f| f.with_window(|w| w.with_maximized(true))).expect("Failed");
}
static App: FC<()> = |cx, props|{
//
cx.render(rsx!(
div {
"hello world!"
}
))
};