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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rustc-rayon"
# Reminder to update html_rool_url in lib.rs when updating version
version = "0.3.0"
version = "0.3.1"
authors = ["Niko Matsakis <[email protected]>",
"Josh Stone <[email protected]>"]
description = "Simple work-stealing parallelism for Rust - fork for rustc"
Expand Down
2 changes: 1 addition & 1 deletion rayon-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rustc-rayon-core"
version = "0.3.0" # reminder to update html_root_url attribute
version = "0.3.1" # reminder to update html_root_url attribute
authors = ["Niko Matsakis <[email protected]>",
"Josh Stone <[email protected]>"]
description = "Core APIs for Rayon - fork for rustc"
Expand Down
10 changes: 7 additions & 3 deletions rayon-core/src/worker_local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ pub struct WorkerLocal<T> {
registry: Arc<Registry>,
}

unsafe impl<T> Send for WorkerLocal<T> {}
unsafe impl<T> Sync for WorkerLocal<T> {}
/// We prevent concurrent access to the underlying value in the
/// Deref impl, thus any values safe to send across threads can
/// be used with WorkerLocal.
unsafe impl<T: Send> Sync for WorkerLocal<T> {}

impl<T> WorkerLocal<T> {
/// Creates a new worker local where the `initial` closure computes the
Expand Down Expand Up @@ -60,7 +62,9 @@ impl<T> WorkerLocal<Vec<T>> {

impl<T: fmt::Debug> fmt::Debug for WorkerLocal<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::Debug::fmt(&self.locals, f)
f.debug_struct("WorkerLocal")
.field("registry", &self.registry.id())
.finish()
}
}

Expand Down