-
Notifications
You must be signed in to change notification settings - Fork 508
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
715: Release and deprecate rayon-futures 0.1.1 r=cuviper a=cuviper This includes the soundness fix from #698, just targeted to a new branch. Co-authored-by: J Claire <jclairecodesstuff@users.noreply.github.com> Co-authored-by: Josh Stone <cuviper@gmail.com>
- Loading branch information
Showing
9 changed files
with
148 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,6 +94,7 @@ script: | |
branches: | ||
only: | ||
- rayon-futures-0.1.x | ||
- master | ||
- staging | ||
- trying |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ test_script: | |
|
||
branches: | ||
only: | ||
- rayon-futures-0.1.x | ||
- master | ||
- staging | ||
- trying |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
// These modules contain `compile_fail` doc tests. | ||
mod future_escape; | ||
mod non_send_item; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/*! ```compile_fail,E0277 | ||
extern crate futures; | ||
extern crate rayon_core; | ||
use std::marker::PhantomData; | ||
use futures::future::poll_fn; | ||
use futures::Poll; | ||
use futures::Async; | ||
use futures::Future; | ||
use rayon_futures::ScopeFutureExt; | ||
use rayon_core::scope; | ||
use rayon_core::ThreadPool; | ||
let evil_future = poll_fn(|| Ok(Async::Ready(PhantomData::<*mut ()>)) ); | ||
let pool = ThreadPool::global(); | ||
scope(|s| { | ||
let f = s.spawn_future(evil_future); //~ ERROR | ||
let _: Result<_, ()> = f.rayon_wait(); | ||
} ); | ||
``` */ | ||
|
||
// Original test case: | ||
|
||
/* #[test] | ||
fn non_send_item() { | ||
use std::marker::PhantomData; | ||
use std::thread; | ||
use futures::future::poll_fn; | ||
struct TattleTale { | ||
id: thread::ThreadId, | ||
not_send: PhantomData<*mut ()> | ||
} | ||
impl Drop for TattleTale { | ||
fn drop(&mut self) { | ||
let drop_id = thread::current().id(); | ||
assert_eq!(self.id, drop_id); | ||
} | ||
} | ||
let evil_future_factory = || { poll_fn(|| { | ||
let evil_item = TattleTale { | ||
id: thread::current().id(), | ||
not_send: PhantomData, | ||
}; | ||
return Ok(Async::Ready(evil_item)); | ||
} ) }; | ||
let pool = ThreadPool::global(); | ||
scope(|s| { | ||
let futures: Vec<_> = (0..1000) | ||
.map(|_: i32| s.spawn_future(evil_future_factory())) | ||
.collect(); | ||
for f in futures { | ||
let _: Result<_, ()> = f.rayon_wait(); | ||
} | ||
} ); | ||
} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters