Skip to content

Commit 46ecce3

Browse files
committed
Remove comment
1 parent 23fe8b6 commit 46ecce3

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

crates/bevy_tasks/src/task_pool.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -183,19 +183,9 @@ impl TaskPool {
183183

184184
f(&mut scope);
185185

186-
#[allow(clippy::suspicious_else_formatting)]
187186
if scope.spawned.is_empty() {
188187
Vec::default()
189-
}
190-
// A previous instance of this code tried to optimize the case of a single task by immediately calling
191-
// future::block_on. However, @willcrichton observed an issue where a scope created within an async task
192-
// (that was already being executed via future::block_on) would hang on the inner task when recursively
193-
// calling future::block_on. Therefore this feature is disabled until someone decides it's needed and
194-
// comes up with a fix.
195-
/* else if scope.spawned.len() == 1 {
196-
vec![future::block_on(&mut scope.spawned[0])]
197-
} */
198-
else {
188+
} else {
199189
let fut = async move {
200190
let mut results = Vec::with_capacity(scope.spawned.len());
201191
for task in scope.spawned {

0 commit comments

Comments
 (0)