diff options
-rw-r--r-- | source/blender/windowmanager/intern/wm_jobs.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c index 1cc9c82ec60..9dedab8cc55 100644 --- a/source/blender/windowmanager/intern/wm_jobs.c +++ b/source/blender/windowmanager/intern/wm_jobs.c @@ -76,17 +76,30 @@ struct wmJob { /** Should store entire own context, for start, update, free */ void *customdata; - /** To prevent cpu overhead, - * use this one which only gets called when job really starts, not in thread */ + /** + * To prevent cpu overhead, use this one which only gets called when job really starts. + * Executed in main thread. + */ void (*initjob)(void *); - /** This runs inside thread, and does full job */ + /** + * This performs the actual parallel work. + * Executed in worker thread(s). + */ void (*startjob)(void *, short *stop, short *do_update, float *progress); - /** Update gets called if thread defines so, and max once per timerstep - * it runs outside thread, blocking blender, no drawing! */ + /** + * Called if thread defines so (see `do_update` flag), and max once per timer step. + * Executed in main thread. + */ void (*update)(void *); - /** Free entire customdata, doesn't run in thread */ + /** + * Free callback (typically for customdata). + * Executed in main thread. + */ void (*free)(void *); - /** Gets called when job is stopped, not in thread */ + /** + * Called when job is stopped. + * Executed in main thread. + */ void (*endjob)(void *); /** Running jobs each have own timer */ |