]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/base/AsyncJobs.dox
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / base / AsyncJobs.dox
index 6e5f16f5ceb556e4787b611f007cebc111a2e3ee..1437c22bba11b579e82da8e64033d5d163f55c84 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
 \defgroup AsyncJobs Asynchronous Jobs
 \ingroup Components
  
-\section Terminology Terminology
+\section AsyncJobsTerminology Terminology
 
 - \b Job: an AsyncJob object.
 - \b Creator: the code creating the job. Usually the Initiator.
 - \b Start: the act of calling AsyncJob::Start with a job pointer.
 - \b Initiator: the code starting the job. Usually the Creator.
 
-\section Life Typical life cycle
+\section AsyncJobsLifecycle Typical life cycle
 
 -# Creator creates and initializes a job.
 -# If Initiator expects to communicate with the job after start,
@@ -37,7 +37,7 @@ If you want to do something before starting the job, do it in the constructor
 or some custom method that the job creator will call _before_ calling
 AsyncJob::Start():
 
-    std::auto_ptr<MyJob> job(new MyJob(...)); // sync/blocking
+    std::unique_ptr<MyJob> job(new MyJob(...)); // sync/blocking
     job->prepare(...); // sync/blocking
     job->prepareSomethingElse(...); // sync/blocking
     AsyncStart(job.release()); // non-blocking
@@ -50,7 +50,7 @@ Keep in mind that you have no async debugging, cleanup, and protections until
 you call AsyncJob::Start with a job pointer.
 
 
-\section Rules Basic rules
+\section AsyncJobsBasicRules Basic rules
 
 - To start a job, use AsyncJob::Start.
   Do not start the same job more than once.