Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task: ignore failure to set TLS in LocalSet Drop #4976

Merged
merged 3 commits into from Sep 13, 2022

Conversation

Darksonn
Copy link
Contributor

@Darksonn Darksonn commented Sep 5, 2022

If we can't set the thread-local when destroying a LocalSet, then we just ignore it and proceed as normal. This means that task destructors wont be able to access the thread-local, but they wouldn't be able to do that previously either.

Closes: #4973

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-task Module: tokio/task labels Sep 5, 2022
@Darksonn Darksonn marked this pull request as ready for review September 5, 2022 09:24
@Noah-Kennedy
Copy link
Contributor

We should probably add a test for this.

@Darksonn Darksonn changed the base branch from master to tokio-1.21.x September 12, 2022 21:14
@Darksonn Darksonn merged commit e4cbc70 into tokio-1.21.x Sep 13, 2022
@Darksonn Darksonn deleted the alice/accept-tls-failure branch September 13, 2022 06:51
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Sep 22, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [tokio](https://tokio.rs) ([source](https://github.com/tokio-rs/tokio)) | dependencies | patch | `1.21.0` -> `1.21.1` |
| [tokio](https://tokio.rs) ([source](https://github.com/tokio-rs/tokio)) | dev-dependencies | patch | `1.21.0` -> `1.21.1` |

---

### Release Notes

<details>
<summary>tokio-rs/tokio</summary>

### [`v1.21.1`](https://github.com/tokio-rs/tokio/releases/tag/tokio-1.21.1)

[Compare Source](tokio-rs/tokio@tokio-1.21.0...tokio-1.21.1)

##### 1.21.1 (September 13, 2022)

##### Fixed

-   net: fix dependency resolution for socket2 ([#&#8203;5000])
-   task: ignore failure to set TLS in `LocalSet` Drop ([#&#8203;4976])

[#&#8203;4976]: tokio-rs/tokio#4976

[#&#8203;5000]: tokio-rs/tokio#5000

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xOTUuMSIsInVwZGF0ZWRJblZlciI6IjMyLjE5NS4xIn0=-->

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1546
Reviewed-by: crapStone <crapstone@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-task Module: tokio/task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tokio LocalSet can no longer be stored in thread_local
2 participants