rt: revert #7757 to fix regression in spawn_blocking (#8057)

This reverts commit 1604bc3351.

Unfortunately, this commit introduced a regression that causes programs
using `spawn_blocking` to hang (see #8056). To fix the regression, we
need to undo this change and publish a v1.52.1 release as soon as
possible.

In the future, we may wish to bring back a sharded queue for
`spawn_blocking` tasks, either based on the implementation added in
#7757 or a new one. However, since this is a substantial change to the
runtime internals, I think such a change should probably be done as an
unstable, opt-in `tokio::runtime::Builder` setting initially, so that we
don't regress existing users. I had hoped we could do this now, but
unfortunately, the sharded queue implementation from #7757 is kind of
tightly coupled with the rest of the `spawn_blocking` machinery and
cannot be easily swapped out --- and the hang still occurs with
`NUM_SHARDS` set to 1, so there isn't an easy way to turn it on and off.
Therefore, in the interest of getting a fix out ASAP, this is just a
simple revert.

Fixes #8056
This commit is contained in:
Eliza Weisman
2026-04-16 20:57:22 +00:00
committed by GitHub
parent 57ff47ab58
commit 56aaa43e91
6 changed files with 124 additions and 338 deletions
+1 -3
View File
@@ -1,4 +1,4 @@
318
316
&
+
<
@@ -32,7 +32,6 @@
8MB
ABI
accessors
adaptively
adaptor
adaptors
Adaptors
@@ -225,7 +224,6 @@ reregistering
resize
resized
RMW
RNG
runtime
runtime's
runtimes