Merge branch 'merge-1.10.1' into master

This commit is contained in:
Alice Ryhl
2021-08-24 20:50:43 +02:00
6 changed files with 25 additions and 5 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ Make sure you activated the full features of the tokio crate on Cargo.toml:
```toml
[dependencies]
tokio = { version = "1.10.0", features = ["full"] }
tokio = { version = "1.10.1", features = ["full"] }
```
Then, on your main.rs:
+8
View File
@@ -1,3 +1,11 @@
# 1.10.1 (August 24, 2021)
### Fixed
- runtime: fix leak in UnownedTask ([#4063])
[#4063]: https://github.com/tokio-rs/tokio/pull/4063
# 1.10.0 (August 12, 2021)
### Added
+1 -1
View File
@@ -7,7 +7,7 @@ name = "tokio"
# - README.md
# - Update CHANGELOG.md.
# - Create "v1.0.x" git tag.
version = "1.10.0"
version = "1.10.1"
edition = "2018"
authors = ["Tokio Contributors <[email protected]>"]
license = "MIT"
+1 -1
View File
@@ -56,7 +56,7 @@ Make sure you activated the full features of the tokio crate on Cargo.toml:
```toml
[dependencies]
tokio = { version = "1.10.0", features = ["full"] }
tokio = { version = "1.10.1", features = ["full"] }
```
Then, on your main.rs:
+8 -2
View File
@@ -369,10 +369,16 @@ impl<S: Schedule> UnownedTask<S> {
let raw = self.raw;
mem::forget(self);
// Poll the task
// Transfer one ref-count to a Task object.
let task = Task::<S> {
raw,
_p: PhantomData,
};
// Use the other ref-count to poll the task.
raw.poll();
// Decrement our extra ref-count
raw.header().state.ref_dec();
drop(task);
}
pub(crate) fn shutdown(self) {
+6
View File
@@ -111,6 +111,12 @@ fn create_shutdown2() {
drop(join);
}
#[test]
fn unowned_poll() {
let (task, _) = unowned(async {}, NoopSchedule);
task.run();
}
#[test]
fn schedule() {
with(|rt| {