bitcoin/bitcoin — pull request #2199 by Diapolo (2013-01-22 17:23:46+00:00)
Title: Rework the clients thread priority handling

This is just a suggestion to assist in re-thinking our current thread priorities and assists (IMHO) in easily setting priorities for threads during the creation time of the thread.

I chose to change some default thread priorities, which should also be considered to be part of a discussion. I'm currently using that code and can verify the internal miner did quite happily find new blocks ;).

That pull could be extended to give users the ability to set the default thread prio via command-line or GUI option.

- removes SetThreadPriority() and integrates that into NewThread() with a
default of THREAD_PRIORITY_NORMAL
- removes special-casing (priority switching) for internal Bitcoin miner
- uses a new default for the following threads: ThreadScriptCheck (below
normal - because normal prio threads on every CPU core could slowdown UX),
ThreadImport (above normal - to speed it up a little) and
ThreadBitcoinMiner (below normal - to compensate the removed special
casing)
- fixes THREAD_PRIORITY_ABOVE_NORMAL for non Windows OSes as normal and
above normal were the same before