mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-23 00:00:10 +02:00
Merge branch 'merge-1.10.1' into master
This commit is contained in:
@@ -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:
|
||||
|
||||
|
||||
@@ -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
@@ -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
@@ -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:
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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| {
|
||||
|
||||
Reference in New Issue
Block a user