mirror of
https://github.com/home-assistant/core.git
synced 2025-11-08 02:19:31 +00:00
Improve loops and lists (#113269)
* Enable PERF * Enable PERF rule * Enable PERF rule * Don't enable flag yet
This commit is contained in:
committed by
GitHub
parent
8a98fb7cfd
commit
05172d8e4d
@@ -21,10 +21,7 @@ async def test_executor_shutdown_can_interrupt_threads(
|
||||
while True:
|
||||
time.sleep(0.1)
|
||||
|
||||
sleep_futures = []
|
||||
|
||||
for _ in range(100):
|
||||
sleep_futures.append(iexecutor.submit(_loop_sleep_in_executor))
|
||||
sleep_futures = [iexecutor.submit(_loop_sleep_in_executor) for _ in range(100)]
|
||||
|
||||
iexecutor.shutdown()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user