Blender
V3.3
|
Public Attributes | |
struct wmJob * | next |
struct wmJob * | prev |
wmWindow * | win |
void * | customdata |
void(* | initjob )(void *) |
wm_jobs_start_callback | startjob |
void(* | update )(void *) |
void(* | free )(void *) |
void(* | endjob )(void *) |
void(* | completed )(void *) |
void(* | canceled )(void *) |
double | timestep |
wmTimer * | wt |
double | start_delay_time |
unsigned int | note |
unsigned int | endnote |
const void * | owner |
int | flag |
short | suspended |
short | running |
short | ready |
short | do_update |
short | stop |
short | job_type |
float | progress |
char | name [128] |
void * | run_customdata |
void(* | run_free )(void *) |
ListBase | threads |
double | start_time |
TicketMutex * | main_thread_mutex |
Called when job is stopped abnormally, i.e. when stop=true but ready=false. Executed in main thread.
Definition at line 99 of file wm_jobs.c.
Referenced by wm_job_end(), and WM_jobs_callbacks_ex().
Called when job is stopped normally, i.e. by simply completing the startjob function. Executed in main thread.
Definition at line 94 of file wm_jobs.c.
Referenced by wm_job_end(), and WM_jobs_callbacks_ex().
void* wmJob::customdata |
Should store entire own context, for start, update, free
Definition at line 64 of file wm_jobs.c.
Referenced by WM_jobs_customdata_get(), WM_jobs_customdata_set(), wm_jobs_kill_job(), WM_jobs_start(), and wm_jobs_timer().
short wmJob::do_update |
Definition at line 112 of file wm_jobs.c.
Referenced by do_job_thread(), and wm_jobs_timer().
Called when job is stopped. Executed in main thread.
Definition at line 89 of file wm_jobs.c.
Referenced by wm_job_end(), WM_jobs_callbacks(), and WM_jobs_callbacks_ex().
unsigned int wmJob::endnote |
Definition at line 107 of file wm_jobs.c.
Referenced by WM_jobs_timer(), and wm_jobs_timer().
int wmJob::flag |
Definition at line 111 of file wm_jobs.c.
Referenced by WM_jobs_get(), wm_jobs_kill_job(), WM_jobs_progress(), WM_jobs_starttime(), wm_jobs_test_suspend_stop(), and wm_jobs_timer().
Free callback (typically for customdata). Executed in main thread.
Definition at line 84 of file wm_jobs.c.
Referenced by WM_jobs_customdata_set(), wm_jobs_kill_job(), and WM_jobs_start().
To prevent cpu overhead, use this one which only gets called when job really starts. Executed in main thread.
Definition at line 69 of file wm_jobs.c.
Referenced by WM_jobs_callbacks(), WM_jobs_callbacks_ex(), and WM_jobs_start().
short wmJob::job_type |
Definition at line 112 of file wm_jobs.c.
Referenced by wm_job_find(), WM_jobs_customdata_from_type(), WM_jobs_get(), WM_jobs_has_running_type(), WM_jobs_kill_type(), and WM_jobs_test().
TicketMutex* wmJob::main_thread_mutex |
Ticket mutex for main thread locking while some job accesses data that the main thread might modify at the same time
Definition at line 129 of file wm_jobs.c.
Referenced by wm_job_free(), WM_job_main_thread_lock_acquire(), WM_job_main_thread_lock_release(), wm_job_main_thread_yield(), and WM_jobs_get().
char wmJob::name[128] |
For display in header, identification
Definition at line 116 of file wm_jobs.c.
Referenced by WM_jobs_get(), WM_jobs_name(), wm_jobs_test_suspend_stop(), and wm_jobs_timer().
unsigned int wmJob::note |
The notifier event timers should send
Definition at line 107 of file wm_jobs.c.
Referenced by WM_jobs_timer(), and wm_jobs_timer().
const void* wmJob::owner |
Definition at line 110 of file wm_jobs.c.
Referenced by wm_job_find(), WM_jobs_customdata_from_type(), WM_jobs_get(), WM_jobs_is_stopped(), WM_jobs_kill(), WM_jobs_kill_all_except(), WM_jobs_kill_type(), WM_jobs_name(), WM_jobs_progress(), WM_jobs_starttime(), WM_jobs_stop(), and WM_jobs_test().
float wmJob::progress |
Definition at line 113 of file wm_jobs.c.
Referenced by do_job_thread(), WM_jobs_progress(), WM_jobs_start(), and wm_jobs_update_progress_bars().
short wmJob::ready |
Definition at line 112 of file wm_jobs.c.
Referenced by do_job_thread(), wm_job_end(), WM_jobs_start(), and wm_jobs_timer().
void* wmJob::run_customdata |
Once running, we store this separately
Definition at line 119 of file wm_jobs.c.
Referenced by do_job_thread(), wm_job_end(), WM_jobs_customdata_get(), wm_jobs_kill_job(), WM_jobs_start(), and wm_jobs_timer().
Definition at line 120 of file wm_jobs.c.
Referenced by wm_jobs_kill_job(), WM_jobs_start(), and wm_jobs_timer().
short wmJob::running |
Definition at line 112 of file wm_jobs.c.
Referenced by WM_jobs_customdata_set(), WM_jobs_has_running(), WM_jobs_has_running_type(), WM_jobs_is_running(), wm_jobs_kill_job(), WM_jobs_start(), WM_jobs_stop(), wm_jobs_test_suspend_stop(), and wm_jobs_timer().
double wmJob::start_delay_time |
Only start job after specified time delay
Definition at line 105 of file wm_jobs.c.
Referenced by WM_jobs_delay_start(), WM_jobs_start(), and wm_jobs_test_suspend_stop().
double wmJob::start_time |
Definition at line 125 of file wm_jobs.c.
Referenced by WM_jobs_start(), WM_jobs_starttime(), and wm_jobs_timer().
wm_jobs_start_callback wmJob::startjob |
This performs the actual parallel work. Executed in worker thread(s).
Definition at line 74 of file wm_jobs.c.
Referenced by do_job_thread(), WM_jobs_callbacks(), WM_jobs_callbacks_ex(), WM_jobs_kill(), WM_jobs_start(), WM_jobs_stop(), and wm_jobs_test_suspend_stop().
short wmJob::stop |
Definition at line 112 of file wm_jobs.c.
Referenced by do_job_thread(), wm_job_end(), WM_jobs_customdata_set(), WM_jobs_is_stopped(), wm_jobs_kill_job(), WM_jobs_start(), WM_jobs_stop(), wm_jobs_test_suspend_stop(), and wm_jobs_timer().
short wmJob::suspended |
Definition at line 112 of file wm_jobs.c.
Referenced by WM_jobs_start(), wm_jobs_test_suspend_stop(), and wm_jobs_timer().
ListBase wmJob::threads |
We use BLI_threads api, but per job only 1 thread runs
Definition at line 123 of file wm_jobs.c.
Referenced by wm_jobs_kill_job(), WM_jobs_start(), and wm_jobs_timer().
double wmJob::timestep |
Running jobs each have own timer
Definition at line 102 of file wm_jobs.c.
Referenced by WM_jobs_start(), and WM_jobs_timer().
Called if thread defines so (see do_update
flag), and max once per timer step. Executed in main thread.
Definition at line 79 of file wm_jobs.c.
Referenced by WM_jobs_callbacks_ex(), and wm_jobs_timer().
wmWindow* wmJob::win |
Job originating from, keep track of this when deleting windows
Definition at line 61 of file wm_jobs.c.
Referenced by WM_jobs_get(), wm_jobs_kill_job(), WM_jobs_start(), wm_jobs_timer(), and wm_jobs_update_progress_bars().
wmTimer* wmJob::wt |
Definition at line 103 of file wm_jobs.c.
Referenced by wm_jobs_kill_job(), WM_jobs_start(), wm_jobs_timer(), and wm_jobs_timer_end().