| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2020-07-27 | mv std libs to library/ | mark | -91/+0 | |
| 2020-07-14 | Remove unnecessary type hints from the Wake impl | Yoshua Wuyts | -3/+2 | |
| 2020-06-19 | `#[deny(unsafe_op_in_unsafe_fn)]` in liballoc | LeSeulArtichaut | -4/+5 | |
| 2020-05-07 | Add Arc::{incr,decr}_strong_count | Yoshua Wuyts | -5/+7 | |
| 2020-04-03 | Fix link in task::Wake docs | Yoshua Wuyts | -2/+4 | |
| 2020-03-23 | Apply suggestions from code review | Saoirse Shipwreckt | -5/+5 | |
| Co-Authored-By: Ashley Mannix <ashleymannix@live.com.au> | ||||
| 2020-03-23 | Update src/liballoc/task.rs | Saoirse Shipwreckt | -1/+1 | |
| Co-Authored-By: Ashley Mannix <ashleymannix@live.com.au> | ||||
| 2020-03-23 | More explicit; CFG on atomic pointer | Without Boats | -3/+3 | |
| 2020-03-23 | typo | Without Boats | -1/+1 | |
| 2020-03-23 | Improve safety implementation, fix typos | Without Boats | -16/+12 | |
| 2020-03-23 | Add Wake trait for safe construction of Wakers. | Without Boats | -0/+91 | |
| Currently, constructing a waker requires calling the unsafe `Waker::from_raw` API. This API requires the user to manually construct a vtable for the waker themself - which is both cumbersome and very error prone. This API would provide an ergonomic, straightforward and guaranteed memory-safe way of constructing a waker. It has been our longstanding intention that the `Waker` type essentially function as an `Arc<dyn Wake>`, with a `Wake` trait as defined here. Two considerations prevented the original API from being shipped as simply an `Arc<dyn Wake>`: - We want to support futures on embedded systems, which may not have an allocator, and in optimized executors for which this API may not be best-suited. Therefore, we have always explicitly supported the maximally-flexible (but also memory-unsafe) `RawWaker` API, and `Waker` has always lived in libcore. - Because `Waker` lives in libcore and `Arc` lives in liballoc, it has not been feasible to provide a constructor for `Waker` from `Arc<dyn Wake>`. Therefore, the Wake trait was left out of the initial version of the task waker API. However, as Rust 1.41, it is possible under the more flexible orphan rules to implement `From<Arc<W>> for Waker where W: Wake` in liballoc. Therefore, we can now define this constructor even though `Waker` lives in libcore. This PR adds these APIs: - A `Wake` trait, which contains two methods - A required method `wake`, which is called by `Waker::wake` - A provided method `wake_by_ref`, which is called by `Waker::wake_by_ref` and which implementors can override if they can optimize this use case. - An implementation of `From<Arc<W>> for Waker where W: Wake + Send + Sync + 'static` - A similar implementation of `From<Arc<W>> for RawWaker`. | ||||
| 2019-02-03 | Update the future/task API | Matthias Einwag | -130/+0 | |
| This change updates the future and task API as discussed in the stabilization RFC at https://github.com/rust-lang/rfcs/pull/2592. Changes: - Replacing UnsafeWake with RawWaker and RawWakerVtable - Removal of LocalWaker - Removal of Arc-based Wake trait | ||||
| 2019-02-03 | liballoc: revert nested imports style changes. | Mazdak Farrokhzad | -5/+3 | |
| 2019-02-02 | liballoc: apply uniform_paths. | Mazdak Farrokhzad | -1/+1 | |
| 2019-02-02 | liballoc: refactor & fix some imports. | Mazdak Farrokhzad | -3/+5 | |
| 2019-02-02 | liballoc: cargo check passes on 2018 | Mazdak Farrokhzad | -1/+1 | |
| 2018-12-25 | Remove licenses | Mark Rousskov | -10/+0 | |
| 2018-08-01 | Switch to bootstrapping from 1.29 beta | Mark Rousskov | -12/+3 | |
| 2018-07-05 | #[cfg(target_has_atomic_cas)] -> #[cfg(target_has_atomic = "cas")] | Jorge Aparicio | -6/+12 | |
| 2018-07-05 | enable Atomic*.{load,store} for ARMv6-M / MSP430 | Jorge Aparicio | -3/+6 | |
| closes #45085 this commit adds an `atomic_cas` target option and an unstable `#[cfg(target_has_atomic_cas)]` attribute to enable a subset of the `Atomic*` API on architectures that don't support atomic CAS natively, like MSP430 and ARMv6-M. | ||||
| 2018-06-29 | Rename alloc::arc to alloc::sync, to match std::sync | Simon Sapin | -1/+1 | |
| 2018-06-06 | Add Future and task system to the standard library | Taylor Cramer | -0/+140 | |
