diff options
author | Bastien Montagne <b.mont29@gmail.com> | 2020-03-13 17:40:42 +0300 |
---|---|---|
committer | Bastien Montagne <b.mont29@gmail.com> | 2020-03-13 19:17:26 +0300 |
commit | 4e26afe0aec8126f590eb8ba3d8139723f3c31b3 (patch) | |
tree | c5ba1d0cb640dcd07985da10f9f52abfbf82fb29 /source/blender/windowmanager/intern/wm_jobs.c | |
parent | 110a35ef5a0e3eae78e48d64b43c456b76c9efa1 (diff) |
Cleanup: Comments of wmJobs callbacks.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_jobs.c')
-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 */ |