Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/util/util_task.h
| Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | |||||
| * Central scheduler that holds running threads ready to execute tasks. A singe | * Central scheduler that holds running threads ready to execute tasks. A singe | ||||
| * queue holds the task from all pools. */ | * queue holds the task from all pools. */ | ||||
| class TaskScheduler | class TaskScheduler | ||||
| { | { | ||||
| public: | public: | ||||
| static void init(int num_threads = 0); | static void init(int num_threads = 0); | ||||
| static void exit(); | static void exit(); | ||||
| static void free_memory(); | |||||
| /* number of threads that can work on task */ | /* number of threads that can work on task */ | ||||
| static int num_threads() { return threads.size(); } | static int num_threads() { return threads.size(); } | ||||
| /* test if any session is using the scheduler */ | /* test if any session is using the scheduler */ | ||||
| static bool active() { return users != 0; } | static bool active() { return users != 0; } | ||||
| protected: | protected: | ||||
| ▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines | |||||