Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Import queue steps #3159

Merged
merged 16 commits into from
Jul 26, 2019
Merged

Import queue steps #3159

merged 16 commits into from
Jul 26, 2019

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Jul 22, 2019

Sits on top of #3146 ; will be easier to review after #3146 is in
Related to #2416

When importing a bunch of blocks, we now yield the importing future after every single block.
In other words: the OS thread runs the task, which imports a single block, then the task is added to the work queue again. This makes it possible for the executor/scheduler to interleave that with other tasks in between.

I consequently removed the keep_going parameter from import_many_blocks. The caller can now interrupt the operation by just dropping the future. This removes the question of what to return if keep_going returns false.

This makes it possible to add a small delay between each imported block, which at the moment is 0.
For #2416, that delay would be non-zero is browsers, so that we don't eat up all of the CPU and give some space to other tasks.

@tomaka tomaka added the A0-please_review Pull request needs code review. label Jul 22, 2019
@rphmeier rphmeier added A8-looksgood and removed A0-please_review Pull request needs code review. labels Jul 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants