<divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="comment">// Copyright 2017 Google Inc. All rights reserved.</span></div>
<divclass="line"><aname="l00003"></a><spanclass="lineno"> 3</span> <spanclass="comment">// Use of this source code is governed by a BSD-style</span></div>
<divclass="line"><aname="l00004"></a><spanclass="lineno"> 4</span> <spanclass="comment">// license that can be found in the LICENSE file or at</span></div>
<divclass="line"><aname="l00022"></a><spanclass="lineno"> 22</span> <spanclass="comment">// A job is a single line of work that is expected to run in parallel with</span></div>
<divclass="line"><aname="l00023"></a><spanclass="lineno"> 23</span> <spanclass="comment">// other jobs.</span></div>
<divclass="line"><aname="l00028"></a><spanclass="lineno"> 28</span> <spanclass="comment">// Request that the job stops executing. This is only a request and</span></div>
<divclass="line"><aname="l00029"></a><spanclass="lineno"> 29</span> <spanclass="comment">// will not block. If you want to wait for the job to complete, use</span></div>
<divclass="line"><aname="l00033"></a><spanclass="lineno"> 33</span> <spanclass="comment">// Get the current status of the job. If the job failed to initialize</span></div>
<divclass="line"><aname="l00034"></a><spanclass="lineno"> 34</span> <spanclass="comment">// or encountered an error during execution this will return the error.</span></div>
<divclass="line"><aname="l00037"></a><spanclass="lineno"> 37</span> <spanclass="comment">// If you want to wait for this job to complete, this will return the</span></div>
<divclass="line"><aname="l00038"></a><spanclass="lineno"> 38</span> <spanclass="comment">// WaitableEvent you can wait on.</span></div>
<divclass="line"><aname="l00053"></a><spanclass="lineno"> 53</span> <spanclass="comment">// Similar to a thread pool, JobManager manages multiple jobs that are expected</span></div>
<divclass="line"><aname="l00054"></a><spanclass="lineno"> 54</span> <spanclass="comment">// to run in parallel. It can be used to register, run, and stop a batch of</span></div>
<divclass="line"><aname="l00058"></a><spanclass="lineno"> 58</span> <spanclass="comment">// @param sync_points is an optional SyncPointQueue used to synchronize and</span></div>
<divclass="line"><aname="l00059"></a><spanclass="lineno"> 59</span> <spanclass="comment">// align cue points. JobManager cancels @a sync_points when any job</span></div>
<divclass="line"><aname="l00060"></a><spanclass="lineno"> 60</span> <spanclass="comment">// fails or is cancelled. It can be NULL.</span></div>
<divclass="line"><aname="l00065"></a><spanclass="lineno"> 65</span> <spanclass="comment">// Create a new job entry by specifying the origin handler at the top of the</span></div>
<divclass="line"><aname="l00066"></a><spanclass="lineno"> 66</span> <spanclass="comment">// chain and a name for the thread. This will only register the job. To start</span></div>
<divclass="line"><aname="l00067"></a><spanclass="lineno"> 67</span> <spanclass="comment">// the job, you need to call |RunJobs|.</span></div>
<divclass="line"><aname="l00070"></a><spanclass="lineno"> 70</span> <spanclass="comment">// Initialize all registered jobs. If any job fails to initialize, this will</span></div>
<divclass="line"><aname="l00071"></a><spanclass="lineno"> 71</span> <spanclass="comment">// return the error and it will not be safe to call |RunJobs| as not all jobs</span></div>
<divclass="line"><aname="l00072"></a><spanclass="lineno"> 72</span> <spanclass="comment">// will be properly initialized.</span></div>
<divclass="line"><aname="l00075"></a><spanclass="lineno"> 75</span> <spanclass="comment">// Run all registered jobs. Before calling this make sure that</span></div>
<divclass="line"><aname="l00076"></a><spanclass="lineno"> 76</span> <spanclass="comment">// |InitializedJobs| returned |Status::OK|. This call is blocking and will</span></div>
<divclass="line"><aname="l00077"></a><spanclass="lineno"> 77</span> <spanclass="comment">// block until all jobs exit.</span></div>
<divclass="line"><aname="l00080"></a><spanclass="lineno"> 80</span> <spanclass="comment">// Ask all jobs to stop running. This call is non-blocking and can be used to</span></div>
<divclass="line"><aname="l00081"></a><spanclass="lineno"> 81</span> <spanclass="comment">// unblock a call to |RunJobs|.</span></div>
<divclass="line"><aname="l00094"></a><spanclass="lineno"> 94</span> <spanclass="comment">// Stores Job entries for delayed construction of Job object.</span></div>
<divclass="line"><aname="l00097"></a><spanclass="lineno"> 97</span> <spanclass="comment">// Stored in JobManager so JobManager can cancel |sync_points| when any job</span></div>
<divclass="line"><aname="l00098"></a><spanclass="lineno"> 98</span> <spanclass="comment">// fails or is cancelled.</span></div>
<divclass="ttc"id="aclassshaka_1_1media_1_1SyncPointQueue_html"><divclass="ttname"><ahref="../../d0/dea/classshaka_1_1media_1_1SyncPointQueue.html">shaka::media::SyncPointQueue</a></div><divclass="ttdoc">A synchronized queue for cue points.</div><divclass="ttdef"><b>Definition:</b><ahref="../../d3/d5f/sync__point__queue_8h_source.html#l00020">sync_point_queue.h:20</a></div></div>
<divclass="ttc"id="anamespaceshaka_html"><divclass="ttname"><ahref="../../d8/daf/namespaceshaka.html">shaka</a></div><divclass="ttdoc">All the methods that are virtual are virtual for mocking.</div><divclass="ttdef"><b>Definition:</b><ahref="../../d4/d15/gflags__hex__bytes_8cc_source.html#l00011">gflags_hex_bytes.cc:11</a></div></div>
Generated on Thu Jun 10 2021 21:44:25 for Shaka Packager SDK by <ahref="https://www.doxygen.org/index.html"><imgclass="footer"src="../../doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.9.1