about summary refs log tree commit diff
path: root/src/libcore/task
AgeCommit message (Collapse)AuthorLines
2019-03-11Improvements to comments in libstd, libcore, liballoc.Alexander Regueiro-1/+1
2019-02-12Merging masterMatthias Einwag-5/+6
2019-02-10libs: doc commentsAlexander Regueiro-12/+12
2019-02-06Change RawWaker constructor to const fnMatthias Einwag-4/+24
2019-02-05review suggestionsMatthias Einwag-0/+5
2019-02-05Apply more review suggestionsMatthias Einwag-0/+6
2019-02-04Add #[must_use] to core::task::PollTaiki Endo-0/+1
2019-02-03Apply review suggestions and fix testsMatthias Einwag-34/+31
2019-02-03Apply suggestions from code reviewMazdak Farrokhzad-4/+6
Co-Authored-By: Matthias247 <matthias.einwag@live.com>
2019-02-03Update the future/task APIMatthias Einwag-235/+83
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
2018-12-25Remove licensesMark Rousskov-30/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-4/+4
2018-11-13fix various typos in doc commentsAndy Russell-1/+1
2018-10-24Update comment based on suggestion.Son-2/+3
2018-10-17Seems like we don't have to refer the file anymore.Son-4/+1
2018-10-17Add doc for impl From for WakerSon-0/+7
2018-10-01LocalWaker and Waker cleanupsTaylor Cramer-32/+33
2018-09-19Remove spawning from task::ContextTaylor Cramer-197/+9
2018-08-06Rename Executor trait to SpawnJosef Reinhard Brandl-32/+33
2018-08-04Remove redundant field names in structsljedrz-1/+1
2018-07-29Fix From<LocalWaker>Josef Reinhard Brandl-3/+5
2018-07-27Auto merge of #52336 - ishitatsuyuki:dyn-rollup, r=Mark-Simulacrumbors-7/+7
Rollup of bare_trait_objects PRs All deny attributes were moved into bootstrap so they can be disabled with a line of config. Warnings for external tools are allowed and it's up to the tool's maintainer to keep it warnings free. r? @Mark-Simulacrum cc @ljedrz @kennytm
2018-07-26Rollup merge of #52721 - cramertj:try-poll, r=aturonMark Rousskov-0/+54
std::ops::Try impl for std::task::Poll I originally left out the `Try` impl for `Poll` because I was curious if we needed it, and @MajorBreakfast and I had discussed the potential for it to introduce confusion about exactly what control-flow was happening at different points. However, after porting a pretty significant chunk of Fuchsia over to futures 0.3, I discovered that I was *constantly* having to do repetitive matching on `Poll<Result<...>>` or `Poll<Option<Result<...>>>` in order to propagate errors correctly. `try_poll` (propagate `Poll::Ready(Err(..))`s) helped in some places, but it was far more common to need some form of conversion between `Result`, `Poll<Result<...>>`, and `Poll<Option<Result<...>>>`. The `Try` trait conveniently provides all of these conversions in addition to a more concise syntax (`?`), so I'd like to experiment with using these instead. cc @seanmonstar r? @aturon Note: this change means that far more futures 0.1 code can work without significant changes since it papers over the fact that `Result` is no longer at the top-level when using `Stream` and `Future` (since it's now `Poll<Result<...>>` or `Poll<Option<Result<...>>>` instead of `Result<Poll<..>>` and `Result<Poll<Option<...>>>`).
2018-07-26Rollup merge of #52610 - MajorBreakfast:task-terminology, r=cramertjMark Rousskov-12/+18
Clarify what a task is Currently we call two distinct concepts "task": 1. The top-level future that is polled until completion 2. The lightweight "thread" that is responsible for polling the top-level future. What additional data beside the future is stored in this type varies between different `Executor` implementations. I'd prefer to return to the old formulation by @alexcrichton: ```rust /// A handle to a "task", which represents a single lightweight "thread" of /// execution driving a future to completion. pub struct Task { ``` Source: [`task_impl/mod.rs` in futures-rs 0.1](https://github.com/rust-lang-nursery/futures-rs/blob/1328fc9e8af5737183df477c7501e6ea24ff2053/src/task_impl/mod.rs#L49-L50) I think that this change will make it much easier to explain everything. r? @aturon @cramertj
2018-07-25std::ops::Try impl for std::task::PollTaylor Cramer-0/+54
2018-07-25Clarify what a task isJosef Reinhard Brandl-12/+18
2018-07-25Enforce #![deny(bare_trait_objects)] in src/libcoreljedrz-7/+7
2018-07-23Forget Waker when cloning LocalWakerThomas de Zeeuw-4/+5
Since NonNull is Copy the inner field of the cloned Waker was copied for use in the new LocalWaker, however this left Waker to be dropped. Which means that when cloning LocalWaker would also erroneously call drop_raw. This change forgets the Waker, rather then dropping it, leaving the inner field to be used by the returned LocalWaker. Closes #52629.
2018-07-12task: remove wrong comments about non-existent LocalWake traitSean McArthur-5/+3
2018-07-04Auto merge of #51935 - cramertj:unpin-references, r=withoutboatsbors-0/+3
Unpin references I also considered adding an impl for raw pointers as well, but that makes it easy to accidentally have unsound owning-collections that might otherwise be able to project pinned-ness (e.g. `Box`). cc @RalfJung r? @withoutboats
2018-07-02Add lifetime to `FutureObj`Josef Reinhard Brandl-154/+4
2018-07-02Make custom trait object for `Future` genericJosef Reinhard Brandl-53/+58
2018-06-29Make Waker and LocalWaker UnpinTaylor Cramer-0/+3
These types never project pinned-ness into their contents, so it is safe for them to be `Unpin`.
2018-06-26Move spawn errors into executor.rsJosef Reinhard Brandl-67/+50
2018-06-26Nested `LocalTaskObj` in `TaskObj`, remove `SpawnErrorObj` conversionsJosef Reinhard Brandl-75/+34
2018-06-26Add `LocalTaskObj`Josef Reinhard Brandl-6/+102
2018-06-26Split libcore/task.rs into submodulesJosef Reinhard Brandl-0/+676
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-2286/+0
This only changes the directory names; it does not change the "real" metadata names.
2013-05-20core::rt: Implement Local for TaskBrian Anderson-5/+6
2013-05-20core::rt: Convert users of local_sched to Local traitBrian Anderson-1/+2
2013-05-20core:rt:: Rename LocalServices to TaskBrian Anderson-6/+6
2013-05-19Register snapshotsBrian Anderson-5/+0
2013-05-19auto merge of #6106 : thestinger/rust/iter, r=bstriebors-10/+9
I don't have a strong opinion on the function vs. method, but there's no point in having both. I'd like to make a `repeat` adaptor like Python/Haskell for turning a value into an infinite stream of the value, so this has to at least be renamed.
2013-05-19Use assert_eq! rather than assert! where possibleCorey Richardson-10/+10
2013-05-18replace old_iter::repeat with the Times traitDaniel Micay-10/+9
2013-05-15Merge remote-tracking branch 'brson/io' into incomingBrian Anderson-19/+35
2013-05-15core::rt: Rename Task to CoroutineBrian Anderson-1/+1
2013-05-15core: Turn task::unkillable, etc. into no-ops in newsched. #6377Brian Anderson-17/+33
Not necessary just yet but they make ARC not work.
2013-05-15auto merge of #6493 : brson/rust/tls, r=thestingerbors-4/+2
2013-05-14core: Fix leak in TLS. #6231Brian Anderson-4/+2