Made background loader thread count dynamic, based on processor count. If there are >=4 processors, one processor is spared for snappy parallel image editing.

This commit is contained in:
Oliver Duis
2010-10-29 09:19:18 +02:00
parent bb1a7ce4bc
commit 93385fddfa
2 changed files with 48 additions and 19 deletions

View File

@@ -71,11 +71,11 @@ class PreviewLoader : public ProcessingThread<DirEntry> {
// Same interface as a normal PreviewLoader to minimize effects on code
class PreviewMultiLoader {
protected:
PreviewLoader loadA,loadB;
int next;
PreviewLoader *loaders;
int next,loaderCount;
public:
PreviewMultiLoader () { next=0; }
PreviewMultiLoader ();
void setPreviewLoaderListener (PreviewLoaderListener* p);