Cleanup: Comments of wmJobs callbacks.

This commit is contained in:
Bastien Montagne 2020-03-13 15:40:42 +01:00
parent 110a35ef5a
commit 4e26afe0ae
1 changed files with 20 additions and 7 deletions

View File

@ -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 */