<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/liballoc/task.rs, branch 1.45.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.45.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.45.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2020-05-07T15:18:25+00:00</updated>
<entry>
<title>Add Arc::{incr,decr}_strong_count</title>
<updated>2020-05-07T15:18:25+00:00</updated>
<author>
<name>Yoshua Wuyts</name>
<email>yoshuawuyts@gmail.com</email>
</author>
<published>2020-04-03T11:10:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b04599ff8405d476a05b83839c67e9aea3c640cb'/>
<id>urn:sha1:b04599ff8405d476a05b83839c67e9aea3c640cb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix link in task::Wake docs</title>
<updated>2020-04-03T09:33:27+00:00</updated>
<author>
<name>Yoshua Wuyts</name>
<email>yoshuawuyts@gmail.com</email>
</author>
<published>2020-04-03T09:33:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3d17993f9f751c34c0233f252a1887bc2934d137'/>
<id>urn:sha1:3d17993f9f751c34c0233f252a1887bc2934d137</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Apply suggestions from code review</title>
<updated>2020-03-23T14:45:30+00:00</updated>
<author>
<name>Saoirse Shipwreckt</name>
<email>woboats@gmail.com</email>
</author>
<published>2020-03-23T00:36:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=32f5724e8ac35e5a314313c6053ff46702223b27'/>
<id>urn:sha1:32f5724e8ac35e5a314313c6053ff46702223b27</id>
<content type='text'>
Co-Authored-By: Ashley Mannix &lt;ashleymannix@live.com.au&gt;</content>
</entry>
<entry>
<title>Update src/liballoc/task.rs</title>
<updated>2020-03-23T14:45:30+00:00</updated>
<author>
<name>Saoirse Shipwreckt</name>
<email>woboats@gmail.com</email>
</author>
<published>2020-03-23T00:35:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=caff9f92abb309297acaa08b167abd90b1433356'/>
<id>urn:sha1:caff9f92abb309297acaa08b167abd90b1433356</id>
<content type='text'>
Co-Authored-By: Ashley Mannix &lt;ashleymannix@live.com.au&gt;</content>
</entry>
<entry>
<title>More explicit; CFG on atomic pointer</title>
<updated>2020-03-23T14:45:30+00:00</updated>
<author>
<name>Without Boats</name>
<email>woboats@gmail.com</email>
</author>
<published>2020-02-02T15:51:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3ae74cafe483b16c6810a4ff34de03da4974b1ce'/>
<id>urn:sha1:3ae74cafe483b16c6810a4ff34de03da4974b1ce</id>
<content type='text'>
</content>
</entry>
<entry>
<title>typo</title>
<updated>2020-03-23T14:45:30+00:00</updated>
<author>
<name>Without Boats</name>
<email>woboats@gmail.com</email>
</author>
<published>2020-01-31T16:14:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ede03a417501eeb2c9913e69cde1a7407f6a91db'/>
<id>urn:sha1:ede03a417501eeb2c9913e69cde1a7407f6a91db</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Improve safety implementation, fix typos</title>
<updated>2020-03-23T14:45:30+00:00</updated>
<author>
<name>Without Boats</name>
<email>woboats@gmail.com</email>
</author>
<published>2020-01-31T16:01:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c9acdb0bd4e7b1dc0a565926467b1b6365dbda14'/>
<id>urn:sha1:c9acdb0bd4e7b1dc0a565926467b1b6365dbda14</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add Wake trait for safe construction of Wakers.</title>
<updated>2020-03-23T14:44:58+00:00</updated>
<author>
<name>Without Boats</name>
<email>woboats@gmail.com</email>
</author>
<published>2020-01-31T13:26:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=06ede350c2f8369cc9f69d0d8e03f9bc497944a4'/>
<id>urn:sha1:06ede350c2f8369cc9f69d0d8e03f9bc497944a4</id>
<content type='text'>
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&lt;dyn Wake&gt;`, with a `Wake` trait as defined here. Two
considerations prevented the original API from being shipped as simply
an `Arc&lt;dyn Wake&gt;`:

- 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&lt;dyn
  Wake&gt;`.

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&lt;Arc&lt;W&gt;&gt; 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&lt;Arc&lt;W&gt;&gt; for Waker where W: Wake + Send +
  Sync + 'static`
- A similar implementation of `From&lt;Arc&lt;W&gt;&gt; for RawWaker`.
</content>
</entry>
<entry>
<title>Update the future/task API</title>
<updated>2019-02-03T21:46:53+00:00</updated>
<author>
<name>Matthias Einwag</name>
<email>matthias.einwag@live.com</email>
</author>
<published>2019-01-30T03:02:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d9a4b22d3291913a8f2158a1b7c195bc30c9286e'/>
<id>urn:sha1:d9a4b22d3291913a8f2158a1b7c195bc30c9286e</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>liballoc: revert nested imports style changes.</title>
<updated>2019-02-03T07:27:44+00:00</updated>
<author>
<name>Mazdak Farrokhzad</name>
<email>twingoow@gmail.com</email>
</author>
<published>2019-02-03T07:27:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2396780cdaedf097dd6a8f3927749bcaf5b1238b'/>
<id>urn:sha1:2396780cdaedf097dd6a8f3927749bcaf5b1238b</id>
<content type='text'>
</content>
</entry>
</feed>
