AsyncTask and serial execution of tasks
<p>I have a project that has some difficult requirements with respect to threading.  My execution flow deals with encoding and decoding of video, wrapping this video into another video format, sending out a socket, etc.  </p>

<p>I essentially have a serial set of tasks for each function of the pipeline that are coded as AsycTasks. These tasks, when complete, fire events to listeners.  The execution is serial as to ensure the video packets being processed are not executed out of order, as to not introduce artifacts.</p>

<p>When I run the pipeline, it takes a few minutes for the system to become unstable, lag and freeze.</p>

<p>Instead of using multiple AsyncTasks executing using a SERIAL_EXECUTOR for each set of tasks, is it more efficient to run one large Async task per job (a job being a start to end flow of the pipeline)?  Should I consider a custom Executor instead?  Does a SERIAL_EXECUTOR spawn multiple threads internally ala THREAD_POOL_EXECUTOR or are all of my AsyncTasks being run on a single thread and could this be the problem for the instability?</p>