Skip to content

Conversation

alexaryn
Copy link
Contributor

No description provided.


## Wait for all tasks to finish
for i, task_id in enumerate(task_ids):
while True:
file_to_result = {}
Copy link
Contributor

@AbhijitP-009 AbhijitP-009 Feb 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It took me reading this loop 3 times to understand why this might be more performant. I guess now we're circling through each of the tasks more frequently so we might increase our chances of "catching" one that's completed and adding its result into the completed list earlier. Although I'm unconvinced that "catching" a completed task earlier and adding its results to the results map earlier is really going to be much more performant, unless I'm missing something.

Also, I'm not convinced that a more efficient code is preferred to easier to understand code in a tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants