Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-08 01:00:49 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-08 01:00:49 +0400
commit204113b791a8eea6087de61199df1d5811055244 (patch)
tree16feb83be39dba028f83a233f367cfdb72c8f342 /intern/cycles/util/util_task.h
parentb51908b913f318986a91c766980ed01010c5249a (diff)
Fix #33107: cycles fixed threads 1 was still having two cores do work,
because main thread works as well.
Diffstat (limited to 'intern/cycles/util/util_task.h')
-rw-r--r--intern/cycles/util/util_task.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/cycles/util/util_task.h b/intern/cycles/util/util_task.h
index a2f284479c7..b795ca7524b 100644
--- a/intern/cycles/util/util_task.h
+++ b/intern/cycles/util/util_task.h
@@ -94,7 +94,10 @@ public:
static void init(int num_threads = 0);
static void exit();
- static int num_threads() { return threads.size(); }
+ /* number of threads that can work on tasks, main thread counts too */
+ static int num_threads() { return threads.size() + 1; }
+
+ /* test if any session is using the scheduler */
static bool active() { return users != 0; }
protected: