The current usage of ScheduleBatchPriority is not transparent. Once the thread scheduling is changed, it remains unchanged for the remainder of the thread’s lifetime. So move the call from ImportBlocks
to the init code where it is clearer that its effect lasts for the entire lifetime of the thread.
Users of the kernel library might not expect ImportBlocks
to have an influence on the thread it is called in. Particularly since it is only a compile time option and cannot be controlled at runtime. With this patch users of the kernel library can now freely choose their own scheduling policy.
This PR is easier reviewed with git diff --color-moved-ws=ignore-all-space --color-moved=dimmed-zebra
This PR is part of the libbitcoinkernel project.