Skip to content

Commit eff2eca

Browse files
authored
Merge pull request #17 from cramertj/futures-cleanup
Cleanup
2 parents 05db198 + af3da95 commit eff2eca

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

text/0000-futures.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ and which can be stored by the implementation of those `Futures`s. Whenever a
176176
waker in order to inform the executor that the task which owns the `Future`
177177
should get scheduled and executed again.
178178

179-
The RFC defines a concrete `Waker` types with which implementors of `Futures`
179+
The RFC defines a concrete `Waker` type with which implementors of `Futures`
180180
and asynchronous functions will interact. This type defines a `wake(&self)`
181-
function which is used to schedule the task that is associated to the `Waker`
181+
method which is used to schedule the task that is associated to the `Waker`
182182
to be polled again.
183183

184184
The mechanism through which tasks get scheduled again depends on the executor
@@ -191,7 +191,7 @@ Possible ways of waking up a an executor include:
191191
- If the executor's thread is parked, the wakeup call needs to unpark it.
192192

193193
To allow executors to implement custom wakeup behavior, the `Waker` type
194-
internally contains a type called `RawWaker`, which consists of a pointer
194+
contains a type called `RawWaker`, which consists of a pointer
195195
to a custom wakeable object and a reference to a virtual function
196196
pointer table (vtable) which provides functions to `clone`, `wake`, and
197197
`drop` the underlying wakeable object.
@@ -295,10 +295,7 @@ impl Waker {
295295
impl Clone for Waker {
296296
fn clone(&self) -> Self {
297297
Waker {
298-
waker: RawWaker {
299-
data: unsafe { (self.waker.vtable.clone)(self.waker.data) },
300-
vtable: self.waker.vtable,
301-
}
298+
waker: unsafe { (self.waker.vtable.clone)(self.waker.data) },
302299
}
303300
}
304301
}

0 commit comments

Comments
 (0)