Skip to content

use .flatten instead of .map_err(...)?#22697

Merged
tdyas merged 1 commit intomainfrom
fix_spawn_blocking
Sep 24, 2025
Merged

use .flatten instead of .map_err(...)?#22697
tdyas merged 1 commit intomainfrom
fix_spawn_blocking

Conversation

@tdyas
Copy link
Copy Markdown
Contributor

@tdyas tdyas commented Sep 24, 2025

In #22688, the Result<_, JoinError> returned by (the renamed) native_spawn_blocking was handled with a map_err. As it turns out, the error closures passed into the (now deleted) spawn_blocking were to handle the JoinError. The code should convert any JoinError's with a single map_err and then flatten so that any Result returned by the task is unwrapped.

@tdyas tdyas requested review from benjyw and sureshjoshi September 24, 2025 13:41
@tdyas tdyas added category:internal CI, fixes for not-yet-released features, etc. release-notes:not-required [CI] PR doesn't require mention in release notes labels Sep 24, 2025
@tdyas tdyas merged commit 45bc6cf into main Sep 24, 2025
46 of 48 checks passed
@tdyas tdyas deleted the fix_spawn_blocking branch September 24, 2025 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:internal CI, fixes for not-yet-released features, etc. release-notes:not-required [CI] PR doesn't require mention in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants