Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion turbopack/crates/turbo-tasks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ mod invalidation;
mod join_iter_ext;
mod key_value_pair;
pub mod keyed;
pub mod keyed_read_ref;
#[doc(hidden)]
pub mod macro_helpers;
mod magic_any;
mod manager;
pub mod mapped_read_ref;
mod marker_trait;
pub mod message_queue;
mod native_function;
Expand Down Expand Up @@ -119,6 +119,7 @@ pub use crate::{
mark_session_dependent, prevent_gc, run, run_once, run_once_with_reason, trait_call,
turbo_tasks, turbo_tasks_scope, turbo_tasks_weak, with_turbo_tasks,
},
mapped_read_ref::MappedReadRef,
output::OutputContent,
raw_vc::{CellId, RawVc, ReadRawVcFuture, ResolveTypeError},
read_options::{ReadCellOptions, ReadOutputOptions},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ pub struct MappedReadRef<A, T> {
arc: triomphe::Arc<A>,
}

unsafe impl<A: Send + Sync, T: Sync> Send for MappedReadRef<A, T> {}
unsafe impl<A: Send + Sync, T: Sync> Sync for MappedReadRef<A, T> {}

impl<A, T> MappedReadRef<A, T> {
/// # Safety
/// The caller must ensure that the `arc` keeps the value pointed to by `value` alive.
Expand Down
4 changes: 2 additions & 2 deletions turbopack/crates/turbo-tasks/src/vc/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use rustc_hash::FxBuildHasher;

use super::traits::VcValueType;
use crate::{
ReadRawVcFuture, ReadRef, VcCast, VcValueTrait, VcValueTraitCast, VcValueTypeCast,
keyed::Keyed, keyed_read_ref::MappedReadRef,
MappedReadRef, ReadRawVcFuture, ReadRef, VcCast, VcValueTrait, VcValueTraitCast,
VcValueTypeCast, keyed::Keyed,
};

type VcReadTarget<T> = <<T as VcValueType>::Read as VcRead<T>>::Target;
Expand Down
Loading