Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinned Channels #2811

Merged
merged 20 commits into from Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main-checks.yml
Expand Up @@ -184,7 +184,7 @@ jobs:
env:
# workaround for lack of ternary operator
# see https://github.com/orgs/community/discussions/25725
RUSTFLAGS: ${{ matrix.toolchain == 'nightly && '--cfg nightly_yew' || '' }}
RUSTFLAGS: ${{ matrix.toolchain == 'nightly' && '--cfg nightly_yew' || '' }}
with:
command: test
args: --all-targets --workspace --exclude yew
Expand All @@ -194,7 +194,7 @@ jobs:
env:
# workaround for lack of ternary operator
# see https://github.com/orgs/community/discussions/25725
RUSTFLAGS: ${{ matrix.toolchain == 'nightly && '--cfg nightly_yew' || '' }}
RUSTFLAGS: ${{ matrix.toolchain == 'nightly' && '--cfg nightly_yew' || '' }}
with:
command: test
args: -p yew --all-features
Expand Down
2 changes: 1 addition & 1 deletion packages/yew/src/html/component/lifecycle.rs
Expand Up @@ -40,7 +40,7 @@ pub(crate) enum ComponentRenderState {
},
#[cfg(feature = "ssr")]
Ssr {
sender: Option<crate::platform::sync::oneshot::Sender<Html>>,
sender: Option<crate::platform::pinned::oneshot::Sender<Html>>,
},
}

Expand Down
2 changes: 1 addition & 1 deletion packages/yew/src/html/component/scope.rs
Expand Up @@ -265,7 +265,7 @@ mod feat_ssr {
ComponentRenderState, CreateRunner, DestroyRunner, RenderRunner,
};
use crate::platform::io::BufWriter;
use crate::platform::sync::oneshot;
use crate::platform::pinned::oneshot;
use crate::scheduler;
use crate::virtual_dom::Collectable;

Expand Down
1 change: 1 addition & 0 deletions packages/yew/src/platform/mod.rs
Expand Up @@ -45,6 +45,7 @@ use std::future::Future;
#[cfg(feature = "ssr")]
pub(crate) mod io;

pub mod pinned;
pub mod sync;
pub mod time;

Expand Down
6 changes: 6 additions & 0 deletions packages/yew/src/platform/pinned/mod.rs
@@ -0,0 +1,6 @@
//! Task synchronisation primitives for pinned tasks.
//!
//! This module provides task synchronisation for `!Send` futures.

pub mod mpsc;
pub mod oneshot;