summaryrefslogtreecommitdiff
path: root/src/charon/processing/jobs/callback_job.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/charon/processing/jobs/callback_job.h')
-rw-r--r--src/charon/processing/jobs/callback_job.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/charon/processing/jobs/callback_job.h b/src/charon/processing/jobs/callback_job.h
index 2bb209cb7..62da1edd1 100644
--- a/src/charon/processing/jobs/callback_job.h
+++ b/src/charon/processing/jobs/callback_job.h
@@ -41,12 +41,12 @@ enum job_requeue_t {
* Do not requeue job, destroy it
*/
JOB_REQUEUE_NONE,
-
+
/**
* Reque the job fairly, meaning it has to requeue as any other job
*/
JOB_REQUEUE_FAIR,
-
+
/**
* Reexecute the job directly, without the need of requeueing it
*/
@@ -88,10 +88,11 @@ struct callback_job_t {
* The job_t interface.
*/
job_t job_interface;
-
+
/**
- * Cancel the jobs thread and wait for its termination.
- */
+ * Cancel the job's thread and wait for its termination. This only works
+ * reliably for jobs that always use JOB_REQUEUE_FAIR or JOB_REQUEUE_DIRECT,
+ * otherwise the job may already be destroyed when cancel is called. */
void (*cancel)(callback_job_t *this);
};
@@ -103,7 +104,7 @@ struct callback_job_t {
* If parent is not NULL, the specified job gets an association. Whenever
* the parent gets cancelled (or runs out), all of its children are cancelled,
* too.
- *
+ *
* @param cb callback to call from the processor
* @param data user data to supply to callback
* @param cleanup destructor for data on destruction, or NULL