[Bf-blender-cvs] [4e26afe0aec] master: Cleanup: Comments of wmJobs callbacks.
Bastien Montagne
noreply at git.blender.org
Fri Mar 13 17:17:34 CET 2020
Commit: 4e26afe0aec8126f590eb8ba3d8139723f3c31b3
Author: Bastien Montagne
Date: Fri Mar 13 15:40:42 2020 +0100
Branches: master
https://developer.blender.org/rB4e26afe0aec8126f590eb8ba3d8139723f3c31b3
Cleanup: Comments of wmJobs callbacks.
===================================================================
M source/blender/windowmanager/intern/wm_jobs.c
===================================================================
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 */
More information about the Bf-blender-cvs
mailing list