1# Release rayon 1.8.1 / rayon-core 1.12.1 (2024-01-17)
2
3- The new `"web_spin_lock"` crate feature makes mutexes spin on the main
4  browser thread in WebAssembly, rather than suffer an error about forbidden
5  `atomics.wait` if they were to block in that context. Thanks @RReverser!
6
7# Release rayon 1.8.0 / rayon-core 1.12.0 (2023-09-20)
8
9- The minimum supported `rustc` is now 1.63.
10- Added `ThreadPoolBuilder::use_current_thread` to use the builder thread as
11  part of the new thread pool. That thread does not run the pool's main loop,
12  but it may participate in work-stealing if it yields to rayon in some way.
13- Implemented `FromParallelIterator<T>` for `Box<[T]>`, `Rc<[T]>`, and
14  `Arc<[T]>`, as well as `FromParallelIterator<Box<str>>` and
15  `ParallelExtend<Box<str>>` for `String`.
16- `ThreadPoolBuilder::build_scoped` now uses `std::thread::scope`.
17- The default number of threads is now determined using
18  `std::thread::available_parallelism` instead of the `num_cpus` crate.
19- The internal logging facility has been removed, reducing bloat for all users.
20- Many smaller performance tweaks and documentation updates.
21
22# Release rayon 1.7.0 / rayon-core 1.11.0 (2023-03-03)
23
24- The minimum supported `rustc` is now 1.59.
25- Added a fallback when threading is unsupported.
26- The new `ParallelIterator::take_any` and `skip_any` methods work like
27  unordered `IndexedParallelIterator::take` and `skip`, counting items in
28  whatever order they are visited in parallel.
29- The new `ParallelIterator::take_any_while` and `skip_any_while` methods work
30  like unordered `Iterator::take_while` and `skip_while`, which previously had
31  no parallel equivalent. The "while" condition may be satisfied from anywhere
32  in the parallel iterator, affecting all future items regardless of position.
33- The new `yield_now` and `yield_local` functions will cooperatively yield
34  execution to Rayon, either trying to execute pending work from the entire
35  pool or from just the local deques of the current thread, respectively.
36
37# Release rayon-core 1.10.2 (2023-01-22)
38
39- Fixed miri-reported UB for SharedReadOnly tags protected by a call.
40
41# Release rayon 1.6.1 (2022-12-09)
42
43- Simplified `par_bridge` to only pull one item at a time from the iterator,
44  without batching. Threads that are waiting for iterator items will now block
45  appropriately rather than spinning CPU. (Thanks @njaard!)
46- Added protection against recursion in `par_bridge`, so iterators that also
47  invoke rayon will not cause mutex recursion deadlocks.
48
49# Release rayon-core 1.10.1 (2022-11-18)
50
51- Fixed a race condition with threads going to sleep while a broadcast starts.
52
53# Release rayon 1.6.0 / rayon-core 1.10.0 (2022-11-18)
54
55- The minimum supported `rustc` is now 1.56.
56- The new `IndexedParallelIterator::fold_chunks` and `fold_chunks_with` methods
57  work like `ParallelIterator::fold` and `fold_with` with fixed-size chunks of
58  items. This may be useful for predictable batching performance, without the
59  allocation overhead of `IndexedParallelIterator::chunks`.
60- New "broadcast" methods run a given function on all threads in the pool.
61  These run at a sort of reduced priority after each thread has exhausted their
62  local work queue, but before they attempt work-stealing from other threads.
63  - The global `broadcast` function and `ThreadPool::broadcast` method will
64    block until completion, returning a `Vec` of all return values.
65  - The global `spawn_broadcast` function and methods on `ThreadPool`, `Scope`,
66    and `ScopeFifo` will run detached, without blocking the current thread.
67- Panicking methods now use `#[track_caller]` to report the caller's location.
68- Fixed a truncated length in `vec::Drain` when given an empty range.
69
70## Contributors
71
72Thanks to all of the contributors for this release!
73
74- @cuviper
75- @idanmuze
76- @JoeyBF
77- @JustForFun88
78- @kianmeng
79- @kornelski
80- @ritchie46
81- @ryanrussell
82- @steffahn
83- @TheIronBorn
84- @willcrozi
85
86# Release rayon 1.5.3 (2022-05-13)
87
88- The new `ParallelSliceMut::par_sort_by_cached_key` is a stable sort that caches
89  the keys for each item -- a parallel version of `slice::sort_by_cached_key`.
90
91# Release rayon-core 1.9.3 (2022-05-13)
92
93- Fixed a use-after-free race in job notification.
94
95# Release rayon 1.5.2 / rayon-core 1.9.2 (2022-04-13)
96
97- The new `ParallelSlice::par_rchunks()` and `par_rchunks_exact()` iterate
98  slice chunks in reverse, aligned the against the end of the slice if the
99  length is not a perfect multiple of the chunk size. The new
100  `ParallelSliceMut::par_rchunks_mut()` and `par_rchunks_exact_mut()` are the
101  same for mutable slices.
102- The `ParallelIterator::try_*` methods now support `std::ops::ControlFlow` and
103  `std::task::Poll` items, mirroring the unstable `Try` implementations in the
104  standard library.
105- The `ParallelString` pattern-based methods now support `&[char]` patterns,
106  which match when any character in that slice is found in the string.
107- A soft limit is now enforced on the number of threads allowed in a single
108  thread pool, respecting internal bit limits that already existed. The current
109  maximum is publicly available from the new function `max_num_threads()`.
110- Fixed several Stacked Borrow and provenance issues found by `cargo miri`.
111
112## Contributors
113
114Thanks to all of the contributors for this release!
115
116- @atouchet
117- @bluss
118- @cuviper
119- @fzyzcjy
120- @nyanzebra
121- @paolobarbolini
122- @RReverser
123- @saethlin
124
125# Release rayon 1.5.1 / rayon-core 1.9.1 (2021-05-18)
126
127- The new `in_place_scope` and `in_place_scope_fifo` are variations of `scope`
128  and `scope_fifo`, running the initial non-`Send` callback directly on the
129  current thread, rather than moving execution to the thread pool.
130- With Rust 1.51 or later, arrays now implement `IntoParallelIterator`.
131- New implementations of `FromParallelIterator` make it possible to `collect`
132  complicated nestings of items.
133  - `FromParallelIterator<(A, B)> for (FromA, FromB)` works like `unzip`.
134  - `FromParallelIterator<Either<L, R>> for (A, B)` works like `partition_map`.
135- Type inference now works better with parallel `Range` and `RangeInclusive`.
136- The implementation of `FromParallelIterator` and `ParallelExtend` for
137  `Vec<T>` now uses `MaybeUninit<T>` internally to avoid creating any
138  references to uninitialized data.
139- `ParallelBridge` fixed a bug with threads missing available work.
140
141## Contributors
142
143Thanks to all of the contributors for this release!
144
145- @atouchet
146- @cuviper
147- @Hywan
148- @iRaiko
149- @Qwaz
150- @rocallahan
151
152# Release rayon 1.5.0 / rayon-core 1.9.0 (2020-10-21)
153
154- Update crossbeam dependencies.
155- The minimum supported `rustc` is now 1.36.
156
157## Contributors
158
159Thanks to all of the contributors for this release!
160
161- @cuviper
162- @mbrubeck
163- @mrksu
164
165# Release rayon 1.4.1 (2020-09-29)
166
167- The new `flat_map_iter` and `flatten_iter` methods can be used to flatten
168  sequential iterators, which may perform better in cases that don't need the
169  nested parallelism of `flat_map` and `flatten`.
170- The new `par_drain` method is a parallel version of the standard `drain` for
171  collections, removing items while keeping the original capacity. Collections
172  that implement this through `ParallelDrainRange` support draining items from
173  arbitrary index ranges, while `ParallelDrainFull` always drains everything.
174- The new `positions` method finds all items that match the given predicate and
175  returns their indices in a new iterator.
176
177# Release rayon-core 1.8.1 (2020-09-17)
178
179- Fixed an overflow panic on high-contention workloads, for a counter that was
180  meant to simply wrap. This panic only occurred with debug assertions enabled,
181  and was much more likely on 32-bit targets.
182
183# Release rayon 1.4.0 / rayon-core 1.8.0 (2020-08-24)
184
185- Implemented a new thread scheduler, [RFC 5], which uses targeted wakeups for
186  new work and for notifications of completed stolen work, reducing wasteful
187  CPU usage in idle threads.
188- Implemented `IntoParallelIterator for Range<char>` and `RangeInclusive<char>`
189  with the same iteration semantics as Rust 1.45.
190- Relaxed the lifetime requirements of the initial `scope` closure.
191
192[RFC 5]: https://github.com/rayon-rs/rfcs/pull/5
193
194## Contributors
195
196Thanks to all of the contributors for this release!
197
198- @CAD97
199- @cuviper
200- @kmaork
201- @nikomatsakis
202- @SuperFluffy
203
204
205# Release rayon 1.3.1 / rayon-core 1.7.1 (2020-06-15)
206
207- Fixed a use-after-free race in calls blocked between two rayon thread pools.
208- Collecting to an indexed `Vec` now drops any partial writes while unwinding,
209  rather than just leaking them. If dropping also panics, Rust will abort.
210  - Note: the old leaking behavior is considered _safe_, just not ideal.
211- The new `IndexedParallelIterator::step_by()` adapts an iterator to step
212  through items by the given count, like `Iterator::step_by()`.
213- The new `ParallelSlice::par_chunks_exact()` and mutable equivalent
214  `ParallelSliceMut::par_chunks_exact_mut()` ensure that the chunks always have
215  the exact length requested, leaving any remainder separate, like the slice
216  methods `chunks_exact()` and `chunks_exact_mut()`.
217
218## Contributors
219
220Thanks to all of the contributors for this release!
221
222- @adrian5
223- @bluss
224- @cuviper
225- @FlyingCanoe
226- @GuillaumeGomez
227- @matthiasbeyer
228- @picoHz
229- @zesterer
230
231
232# Release rayon 1.3.0 / rayon-core 1.7.0 (2019-12-21)
233
234- Tuples up to length 12 now implement `IntoParallelIterator`, creating a
235  `MultiZip` iterator that produces items as similarly-shaped tuples.
236- The `--cfg=rayon_unstable` supporting code for `rayon-futures` is removed.
237- The minimum supported `rustc` is now 1.31.
238
239## Contributors
240
241Thanks to all of the contributors for this release!
242
243- @cuviper
244- @c410-f3r
245- @silwol
246
247
248# Release rayon-futures 0.1.1 (2019-12-21)
249
250- `Send` bounds have been added for the `Item` and `Error` associated types on
251  all generic `F: Future` interfaces. While technically a breaking change, this
252  is a soundness fix, so we are not increasing the semantic version for this.
253- This crate is now deprecated, and the `--cfg=rayon_unstable` supporting code
254  will be removed in `rayon-core 1.7.0`. This only supported the now-obsolete
255  `Future` from `futures 0.1`, while support for `std::future::Future` is
256  expected to come directly in `rayon-core` -- although that is not ready yet.
257
258## Contributors
259
260Thanks to all of the contributors for this release!
261
262- @cuviper
263- @kornelski
264- @jClaireCodesStuff
265- @jwass
266- @seanchen1991
267
268
269# Release rayon 1.2.1 / rayon-core 1.6.1 (2019-11-20)
270
271- Update crossbeam dependencies.
272- Add top-level doc links for the iterator traits.
273- Document that the iterator traits are not object safe.
274
275## Contributors
276
277Thanks to all of the contributors for this release!
278
279- @cuviper
280- @dnaka91
281- @matklad
282- @nikomatsakis
283- @Qqwy
284- @vorner
285
286
287# Release rayon 1.2.0 / rayon-core 1.6.0 (2019-08-30)
288
289- The new `ParallelIterator::copied()` converts an iterator of references into
290  copied values, like `Iterator::copied()`.
291- `ParallelExtend` is now implemented for the unit `()`.
292- Internal updates were made to improve test determinism, reduce closure type
293  sizes, reduce task allocations, and update dependencies.
294- The minimum supported `rustc` is now 1.28.
295
296## Contributors
297
298Thanks to all of the contributors for this release!
299
300- @Aaron1011
301- @cuviper
302- @ralfbiedert
303
304
305# Release rayon 1.1.0 / rayon-core 1.5.0 (2019-06-12)
306
307- FIFO spawns are now supported using the new `spawn_fifo()` and `scope_fifo()`
308  global functions, and their corresponding `ThreadPool` methods.
309  - Normally when tasks are queued on a thread, the most recent is processed
310    first (LIFO) while other threads will steal the oldest (FIFO). With FIFO
311    spawns, those tasks are processed locally in FIFO order too.
312  - Regular spawns and other tasks like `join` are not affected.
313  - The `breadth_first` configuration flag, which globally approximated this
314    effect, is now deprecated.
315  - For more design details, please see [RFC 1].
316- `ThreadPoolBuilder` can now take a custom `spawn_handler` to control how
317  threads will be created in the pool.
318  - `ThreadPoolBuilder::build_scoped()` uses this to create a scoped thread
319    pool, where the threads are able to use non-static data.
320  - This may also be used to support threading in exotic environments, like
321    WebAssembly, which don't support the normal `std::thread`.
322- `ParallelIterator` has 3 new methods: `find_map_any()`, `find_map_first()`,
323  and `find_map_last()`, like `Iterator::find_map()` with ordering constraints.
324- The new `ParallelIterator::panic_fuse()` makes a parallel iterator halt as soon
325  as possible if any of its threads panic. Otherwise, the panic state is not
326  usually noticed until the iterator joins its parallel tasks back together.
327- `IntoParallelIterator` is now implemented for integral `RangeInclusive`.
328- Several internal `Folder`s now have optimized `consume_iter` implementations.
329- `rayon_core::current_thread_index()` is now re-exported in `rayon`.
330- The minimum `rustc` is now 1.26, following the update policy defined in [RFC 3].
331
332## Contributors
333
334Thanks to all of the contributors for this release!
335
336- @cuviper
337- @didroe
338- @GuillaumeGomez
339- @huonw
340- @janriemer
341- @kornelski
342- @nikomatsakis
343- @seanchen1991
344- @yegeun542
345
346[RFC 1]: https://github.com/rayon-rs/rfcs/blob/master/accepted/rfc0001-scope-scheduling.md
347[RFC 3]: https://github.com/rayon-rs/rfcs/blob/master/accepted/rfc0003-minimum-rustc.md
348
349
350# Release rayon 1.0.3 (2018-11-02)
351
352- `ParallelExtend` is now implemented for tuple pairs, enabling nested
353  `unzip()` and `partition_map()` operations.  For instance, `(A, (B, C))`
354  items can be unzipped into `(Vec<A>, (Vec<B>, Vec<C>))`.
355  - `ParallelExtend<(A, B)>` works like `unzip()`.
356  - `ParallelExtend<Either<A, B>>` works like `partition_map()`.
357- `ParallelIterator` now has a method `map_init()` which calls an `init`
358  function for a value to pair with items, like `map_with()` but dynamically
359  constructed.  That value type has no constraints, not even `Send` or `Sync`.
360  - The new `for_each_init()` is a variant of this for simple iteration.
361  - The new `try_for_each_init()` is a variant for fallible iteration.
362
363## Contributors
364
365Thanks to all of the contributors for this release!
366
367- @cuviper
368- @dan-zheng
369- @dholbert
370- @ignatenkobrain
371- @mdonoughe
372
373
374# Release rayon 1.0.2 / rayon-core 1.4.1 (2018-07-17)
375
376- The `ParallelBridge` trait with method `par_bridge()` makes it possible to
377  use any `Send`able `Iterator` in parallel!
378  - This trait has been added to `rayon::prelude`.
379  - It automatically implements internal synchronization and queueing to
380    spread the `Item`s across the thread pool.  Iteration order is not
381    preserved by this adaptor.
382  - "Native" Rayon iterators like `par_iter()` should still be preferred when
383    possible for better efficiency.
384- `ParallelString` now has additional methods for parity with `std` string
385  iterators: `par_char_indices()`, `par_bytes()`, `par_encode_utf16()`,
386  `par_matches()`, and `par_match_indices()`.
387- `ParallelIterator` now has fallible methods `try_fold()`, `try_reduce()`,
388  and `try_for_each`, plus `*_with()` variants of each, for automatically
389  short-circuiting iterators on `None` or `Err` values.  These are inspired by
390  `Iterator::try_fold()` and `try_for_each()` that were stabilized in Rust 1.27.
391- `Range<i128>` and `Range<u128>` are now supported with Rust 1.26 and later.
392- Small improvements have been made to the documentation.
393- `rayon-core` now only depends on `rand` for testing.
394- Rayon tests now work on stable Rust.
395
396## Contributors
397
398Thanks to all of the contributors for this release!
399
400- @AndyGauge
401- @cuviper
402- @ignatenkobrain
403- @LukasKalbertodt
404- @MajorBreakfast
405- @nikomatsakis
406- @paulkernfeld
407- @QuietMisdreavus
408
409
410# Release rayon 1.0.1 (2018-03-16)
411
412- Added more documentation for `rayon::iter::split()`.
413- Corrected links and typos in documentation.
414
415## Contributors
416
417Thanks to all of the contributors for this release!
418
419- @cuviper
420- @HadrienG2
421- @matthiasbeyer
422- @nikomatsakis
423
424
425# Release rayon 1.0.0 / rayon-core 1.4.0 (2018-02-15)
426
427- `ParallelIterator` added the `update` method which applies a function to
428  mutable references, inspired by `itertools`.
429- `IndexedParallelIterator` added the `chunks` method which yields vectors of
430  consecutive items from the base iterator, inspired by `itertools`.
431- `String` now implements `FromParallelIterator<Cow<str>>` and
432  `ParallelExtend<Cow<str>>`, inspired by `std`.
433- `()` now implements `FromParallelIterator<()>`, inspired by `std`.
434- The new `ThreadPoolBuilder` replaces and deprecates `Configuration`.
435  - Errors from initialization now have the concrete `ThreadPoolBuildError`
436    type, rather than `Box<Error>`, and this type implements `Send` and `Sync`.
437  - `ThreadPool::new` is deprecated in favor of `ThreadPoolBuilder::build`.
438  - `initialize` is deprecated in favor of `ThreadPoolBuilder::build_global`.
439- Examples have been added to most of the parallel iterator methods.
440- A lot of the documentation has been reorganized and extended.
441
442## Breaking changes
443
444- Rayon now requires rustc 1.13 or greater.
445- `IndexedParallelIterator::len` and `ParallelIterator::opt_len` now operate on
446  `&self` instead of `&mut self`.
447- `IndexedParallelIterator::collect_into` is now `collect_into_vec`.
448- `IndexedParallelIterator::unzip_into` is now `unzip_into_vecs`.
449- Rayon no longer exports the deprecated `Configuration` and `initialize` from
450  rayon-core.
451
452## Contributors
453
454Thanks to all of the contributors for this release!
455
456- @Bilkow
457- @cuviper
458- @Enet4
459- @ignatenkobrain
460- @iwillspeak
461- @jeehoonkang
462- @jwass
463- @Kerollmops
464- @KodrAus
465- @kornelski
466- @MaloJaffre
467- @nikomatsakis
468- @obv-mikhail
469- @oddg
470- @phimuemue
471- @stjepang
472- @tmccombs
473- bors[bot]
474
475
476# Release rayon 0.9.0 / rayon-core 1.3.0 / rayon-futures 0.1.0 (2017-11-09)
477
478- `Configuration` now has a `build` method.
479- `ParallelIterator` added `flatten` and `intersperse`, both inspired by
480  itertools.
481- `IndexedParallelIterator` added `interleave`, `interleave_shortest`, and
482  `zip_eq`, all inspired by itertools.
483- The new functions `iter::empty` and `once` create parallel iterators of
484  exactly zero or one item, like their `std` counterparts.
485- The new functions `iter::repeat` and `repeatn` create parallel iterators
486  repeating an item indefinitely or `n` times, respectively.
487- The new function `join_context` works like `join`, with an added `FnContext`
488  parameter that indicates whether the job was stolen.
489- `Either` (used by `ParallelIterator::partition_map`) is now re-exported from
490  the `either` crate, instead of defining our own type.
491  - `Either` also now implements `ParallelIterator`, `IndexedParallelIterator`,
492    and `ParallelExtend` when both of its `Left` and `Right` types do.
493- All public types now implement `Debug`.
494- Many of the parallel iterators now implement `Clone` where possible.
495- Much of the documentation has been extended. (but still could use more help!)
496- All rayon crates have improved metadata.
497- Rayon was evaluated in the Libz Blitz, leading to many of these improvements.
498- Rayon pull requests are now guarded by bors-ng.
499
500## Futures
501
502The `spawn_future()` method has been refactored into its own `rayon-futures`
503crate, now through a `ScopeFutureExt` trait for `ThreadPool` and `Scope`.  The
504supporting `rayon-core` APIs are still gated by `--cfg rayon_unstable`.
505
506## Breaking changes
507
508- Two breaking changes have been made to `rayon-core`, but since they're fixing
509  soundness bugs, we are considering these _minor_ changes for semver.
510  - `Scope::spawn` now requires `Send` for the closure.
511  - `ThreadPool::install` now requires `Send` for the return value.
512- The `iter::internal` module has been renamed to `iter::plumbing`, to hopefully
513  indicate that while these are low-level details, they're not really internal
514  or private to rayon.  The contents of that module are needed for third-parties
515  to implement new parallel iterators, and we'll treat them with normal semver
516  stability guarantees.
517- The function `rayon::iter::split` is no longer re-exported as `rayon::split`.
518
519## Contributors
520
521Thanks to all of the contributors for this release!
522
523- @AndyGauge
524- @ChristopherDavenport
525- @chrisvittal
526- @cuviper
527- @dns2utf8
528- @dtolnay
529- @frewsxcv
530- @gsquire
531- @Hittherhod
532- @jdr023
533- @laumann
534- @leodasvacas
535- @lvillani
536- @MajorBreakfast
537- @mamuleanu
538- @marmistrz
539- @mbrubeck
540- @mgattozzi
541- @nikomatsakis
542- @smt923
543- @stjepang
544- @tmccombs
545- @vishalsodani
546- bors[bot]
547
548
549# Release rayon 0.8.2 (2017-06-28)
550
551- `ParallelSliceMut` now has six parallel sorting methods with the same
552  variations as the standard library.
553  - `par_sort`, `par_sort_by`, and `par_sort_by_key` perform stable sorts in
554    parallel, using the default order, a custom comparator, or a key extraction
555    function, respectively.
556  - `par_sort_unstable`, `par_sort_unstable_by`, and `par_sort_unstable_by_key`
557    perform unstable sorts with the same comparison options.
558  - Thanks to @stjepang!
559
560
561# Release rayon 0.8.1 / rayon-core 1.2.0 (2017-06-14)
562
563- The following core APIs are being stabilized:
564  - `rayon::spawn()` -- spawns a task into the Rayon threadpool; as it
565    is contained in the global scope (rather than a user-created
566    scope), the task cannot capture anything from the current stack
567    frame.
568  - `ThreadPool::join()`, `ThreadPool::spawn()`, `ThreadPool::scope()`
569    -- convenience APIs for launching new work within a thread-pool.
570- The various iterator adapters are now tagged with `#[must_use]`
571- Parallel iterators now offer a `for_each_with` adapter, similar to
572  `map_with`.
573- We are adopting a new approach to handling the remaining unstable
574  APIs (which primarily pertain to futures integration). As awlays,
575  unstable APIs are intended for experimentation, but do not come with
576  any promise of compatibility (in other words, we might change them
577  in arbitrary ways in any release). Previously, we designated such
578  APIs using a Cargo feature "unstable". Now, we are using a regular
579  `#[cfg]` flag. This means that to see the unstable APIs, you must do
580  `RUSTFLAGS='--cfg rayon_unstable' cargo build`. This is
581  intentionally inconvenient; in particular, if you are a library,
582  then your clients must also modify their environment, signaling
583  their agreement to instability.
584
585
586# Release rayon 0.8.0 / rayon-core 1.1.0 (2017-06-13)
587
588## Rayon 0.8.0
589
590- Added the `map_with` and `fold_with` combinators, which help for
591  passing along state (like channels) that cannot be shared between
592  threads but which can be cloned on each thread split.
593- Added the `while_some` combinator, which helps for writing short-circuiting iterators.
594- Added support for "short-circuiting" collection: e.g., collecting
595  from an iterator producing `Option<T>` or `Result<T, E>` into a
596  `Option<Collection<T>>` or `Result<Collection<T>, E>`.
597- Support `FromParallelIterator` for `Cow`.
598- Removed the deprecated weight APIs.
599- Simplified the parallel iterator trait hierarchy by removing the
600  `BoundedParallelIterator` and `ExactParallelIterator` traits,
601  which were not serving much purpose.
602- Improved documentation.
603- Added some missing `Send` impls.
604- Fixed some small bugs.
605
606## Rayon-core 1.1.0
607
608- We now have more documentation.
609- Renamed the (unstable) methods `spawn_async` and
610  `spawn_future_async` -- which spawn tasks that cannot hold
611  references -- to simply `spawn` and `spawn_future`, respectively.
612- We are now using the coco library for our deque.
613- Individual threadpools can now be configured in "breadth-first"
614  mode, which causes them to execute spawned tasks in the reverse
615  order that they used to.  In some specific scenarios, this can be a
616  win (though it is not generally the right choice).
617- Added top-level functions:
618  - `current_thread_index`, for querying the index of the current worker thread within
619    its thread-pool (previously available as `thread_pool.current_thread_index()`);
620  - `current_thread_has_pending_tasks`, for querying whether the
621    current worker that has an empty task deque or not. This can be
622    useful when deciding whether to spawn a task.
623- The environment variables for controlling Rayon are now
624  `RAYON_NUM_THREADS` and `RAYON_LOG`. The older variables (e.g.,
625  `RAYON_RS_NUM_CPUS` are still supported but deprecated).
626
627## Rayon-demo
628
629- Added a new game-of-life benchmark.
630
631## Contributors
632
633Thanks to the following contributors:
634
635- @ChristopherDavenport
636- @SuperFluffy
637- @antoinewdg
638- @crazymykl
639- @cuviper
640- @glandium
641- @julian-seward1
642- @leodasvacas
643- @leshow
644- @lilianmoraru
645- @mschmo
646- @nikomatsakis
647- @stjepang
648
649
650# Release rayon 0.7.1 / rayon-core 1.0.2 (2017-05-30)
651
652This release is a targeted performance fix for #343, an issue where
653rayon threads could sometimes enter into a spin loop where they would
654be unable to make progress until they are pre-empted.
655
656
657# Release rayon 0.7 / rayon-core 1.0 (2017-04-06)
658
659This release marks the first step towards Rayon 1.0. **For best
660performance, it is important that all Rayon users update to at least
661Rayon 0.7.** This is because, as of Rayon 0.7, we have taken steps to
662ensure that, no matter how many versions of rayon are actively in use,
663there will only be a single global scheduler. This is achieved via the
664`rayon-core` crate, which is being released at version 1.0, and which
665encapsulates the core schedule APIs like `join()`. (Note: the
666`rayon-core` crate is, to some degree, an implementation detail, and
667not intended to be imported directly; it's entire API surface is
668mirrored through the rayon crate.)
669
670We have also done a lot of work reorganizing the API for Rayon 0.7 in
671preparation for 1.0. The names of iterator types have been changed and
672reorganized (but few users are expected to be naming those types
673explicitly anyhow). In addition, a number of parallel iterator methods
674have been adjusted to match those in the standard iterator traits more
675closely. See the "Breaking Changes" section below for
676details.
677
678Finally, Rayon 0.7 includes a number of new features and new parallel
679iterator methods. **As of this release, Rayon's parallel iterators
680have officially reached parity with sequential iterators** -- that is,
681every sequential iterator method that makes any sense in parallel is
682supported in some capacity.
683
684### New features and methods
685
686- The internal `Producer` trait now features `fold_with`, which enables
687  better performance for some parallel iterators.
688- Strings now support `par_split()` and `par_split_whitespace()`.
689- The `Configuration` API is expanded and simplified:
690    - `num_threads(0)` no longer triggers an error
691    - you can now supply a closure to name the Rayon threads that get created
692      by using `Configuration::thread_name`.
693    - you can now inject code when Rayon threads start up and finish
694    - you can now set a custom panic handler to handle panics in various odd situations
695- Threadpools are now able to more gracefully put threads to sleep when not needed.
696- Parallel iterators now support `find_first()`, `find_last()`, `position_first()`,
697  and `position_last()`.
698- Parallel iterators now support `rev()`, which primarily affects subsequent calls
699  to `enumerate()`.
700- The `scope()` API is now considered stable (and part of `rayon-core`).
701- There is now a useful `rayon::split` function for creating custom
702  Rayon parallel iterators.
703- Parallel iterators now allow you to customize the min/max number of
704  items to be processed in a given thread. This mechanism replaces the
705  older `weight` mechanism, which is deprecated.
706- `sum()` and friends now use the standard `Sum` traits
707
708### Breaking changes
709
710In the move towards 1.0, there have been a number of minor breaking changes:
711
712- Configuration setters like `Configuration::set_num_threads()` lost the `set_` prefix,
713  and hence become something like `Configuration::num_threads()`.
714- `Configuration` getters are removed
715- Iterator types have been shuffled around and exposed more consistently:
716    - combinator types live in `rayon::iter`, e.g. `rayon::iter::Filter`
717    - iterators over various types live in a module named after their type,
718      e.g. `rayon::slice::Windows`
719- When doing a `sum()` or `product()`, type annotations are needed for the result
720  since it is now possible to have the resulting sum be of a type other than the value
721  you are iterating over (this mirrors sequential iterators).
722
723### Experimental features
724
725Experimental features require the use of the `unstable` feature. Their
726APIs may change or disappear entirely in future releases (even minor
727releases) and hence they should be avoided for production code.
728
729- We now have (unstable) support for futures integration. You can use
730  `Scope::spawn_future` or `rayon::spawn_future_async()`.
731- There is now a `rayon::spawn_async()` function for using the Rayon
732  threadpool to run tasks that do not have references to the stack.
733
734### Contributors
735
736Thanks to the following people for their contributions to this release:
737
738- @Aaronepower
739- @ChristopherDavenport
740- @bluss
741- @cuviper
742- @froydnj
743- @gaurikholkar
744- @hniksic
745- @leodasvacas
746- @leshow
747- @martinhath
748- @mbrubeck
749- @nikomatsakis
750- @pegomes
751- @schuster
752- @torkleyy
753
754
755# Release 0.6 (2016-12-21)
756
757This release includes a lot of progress towards the goal of parity
758with the sequential iterator API, though there are still a few methods
759that are not yet complete. If you'd like to help with that effort,
760[check out the milestone](https://github.com/rayon-rs/rayon/issues?q=is%3Aopen+is%3Aissue+milestone%3A%22Parity+with+the+%60Iterator%60+trait%22)
761to see the remaining issues.
762
763**Announcement:** @cuviper has been added as a collaborator to the
764Rayon repository for all of his outstanding work on Rayon, which
765includes both internal refactoring and helping to shape the public
766API. Thanks @cuviper! Keep it up.
767
768- We now support `collect()` and not just `collect_with()`.
769  You can use `collect()` to build a number of collections,
770  including vectors, maps, and sets. Moreover, when building a vector
771  with `collect()`, you are no longer limited to exact parallel iterators.
772  Thanks @nikomatsakis, @cuviper!
773- We now support `skip()` and `take()` on parallel iterators.
774  Thanks @martinhath!
775- **Breaking change:** We now match the sequential APIs for `min()` and `max()`.
776  We also support `min_by_key()` and `max_by_key()`. Thanks @tapeinosyne!
777- **Breaking change:** The `mul()` method is now renamed to `product()`,
778  to match sequential iterators. Thanks @jonathandturner!
779- We now support parallel iterator over ranges on `u64` values. Thanks @cuviper!
780- We now offer a `par_chars()` method on strings for iterating over characters
781  in parallel. Thanks @cuviper!
782- We now have new demos: a traveling salesman problem solver as well as matrix
783  multiplication. Thanks @nikomatsakis, @edre!
784- We are now documenting our minimum rustc requirement (currently
785  v1.12.0).  We will attempt to maintain compatibility with rustc
786  stable v1.12.0 as long as it remains convenient, but if new features
787  are stabilized or added that would be helpful to Rayon, or there are
788  bug fixes that we need, we will bump to the most recent rustc. Thanks @cuviper!
789- The `reduce()` functionality now has better inlining.
790  Thanks @bluss!
791- The `join()` function now has some documentation. Thanks @gsquire!
792- The project source has now been fully run through rustfmt.
793  Thanks @ChristopherDavenport!
794- Exposed helper methods for accessing the current thread index.
795  Thanks @bholley!
796
797
798# Release 0.5 (2016-11-04)
799
800- **Breaking change:** The `reduce` method has been vastly
801  simplified, and `reduce_with_identity` has been deprecated.
802- **Breaking change:** The `fold` method has been changed. It used to
803  always reduce the values, but now instead it is a combinator that
804  returns a parallel iterator which can itself be reduced. See the
805  docs for more information.
806- The following parallel iterator combinators are now available (thanks @cuviper!):
807  - `find_any()`: similar to `find` on a sequential iterator,
808    but doesn't necessarily return the *first* matching item
809  - `position_any()`: similar to `position` on a sequential iterator,
810    but doesn't necessarily return the index of *first* matching item
811  - `any()`, `all()`: just like their sequential counterparts
812- The `count()` combinator is now available for parallel iterators.
813- We now build with older versions of rustc again (thanks @durango!),
814  as we removed a stray semicolon from `thread_local!`.
815- Various improvements to the (unstable) `scope()` API implementation.
816
817
818# Release 0.4.3 (2016-10-25)
819
820- Parallel iterators now offer an adaptive weight scheme,
821  which means that explicit weights should no longer
822  be necessary in most cases! Thanks @cuviper!
823  - We are considering removing weights or changing the weight mechanism
824    before 1.0. Examples of scenarios where you still need weights even
825    with this adaptive mechanism would be great. Join the discussion
826    at <https://github.com/rayon-rs/rayon/issues/111>.
827- New (unstable) scoped threads API, see `rayon::scope` for details.
828  - You will need to supply the [cargo feature] `unstable`.
829- The various demos and benchmarks have been consolidated into one
830  program, `rayon-demo`.
831- Optimizations in Rayon's inner workings. Thanks @emilio!
832- Update `num_cpus` to 1.0. Thanks @jamwt!
833- Various internal cleanup in the implementation and typo fixes.
834  Thanks @cuviper, @Eh2406, and @spacejam!
835
836[cargo feature]: https://doc.rust-lang.org/cargo/reference/features.html#the-features-section
837
838
839# Release 0.4.2 (2016-09-15)
840
841- Updated crates.io metadata.
842
843
844# Release 0.4.1 (2016-09-14)
845
846- New `chain` combinator for parallel iterators.
847- `Option`, `Result`, as well as many more collection types now have
848  parallel iterators.
849- New mergesort demo.
850- Misc fixes.
851
852Thanks to @cuviper, @edre, @jdanford, @frewsxcv for their contributions!
853
854
855# Release 0.4 (2016-05-16)
856
857- Make use of latest versions of catch-panic and various fixes to panic propagation.
858- Add new prime sieve demo.
859- Add `cloned()` and `inspect()` combinators.
860- Misc fixes for Rust RFC 1214.
861
862Thanks to @areilb1, @Amanieu, @SharplEr, and @cuviper for their contributions!
863
864
865# Release 0.3 (2016-02-23)
866
867- Expanded `par_iter` APIs now available:
868  - `into_par_iter` is now supported on vectors (taking ownership of the elements)
869- Panic handling is much improved:
870  - if you use the Nightly feature, experimental panic recovery is available
871  - otherwise, panics propagate out and poision the workpool
872- New `Configuration` object to control number of threads and other details
873- New demos and benchmarks
874  - try `cargo run --release -- visualize` in `demo/nbody` :)
875    - Note: a nightly compiler is required for this demo due to the
876      use of the `+=` syntax
877
878Thanks to @bjz, @cuviper, @Amanieu, and @willi-kappler for their contributions!
879
880
881# Release 0.2 and earlier
882
883No release notes were being kept at this time.
884