mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-10 02:56:52 +00:00
Add an explanatory comment to scoped_thread
.
This commit is contained in:
parent
0a7d2970e5
commit
1e8ec2db1d
@ -102,6 +102,8 @@ impl Write for Sink {
|
||||
}
|
||||
}
|
||||
|
||||
/// Like a `thread::Builder::spawn` followed by a `join()`, but avoids the need
|
||||
/// for `'static` bounds.
|
||||
#[cfg(not(parallel_compiler))]
|
||||
pub fn scoped_thread<F: FnOnce() -> R + Send, R: Send>(cfg: thread::Builder, f: F) -> R {
|
||||
struct Ptr(*mut ());
|
||||
|
Loading…
Reference in New Issue
Block a user