The Pipeline::Segment::Async module allows you to write asynchronous pipeline segments. Whenever an asynchronous segment is dispatched it places itself in the store, and splits away from the main process that keeps running. At any point furthe down the pipeline you can request the segment from the store, and then ask it to give you back its return values by calling the reattach() method, or even, throw them away by calling discard() which will simply destroy the segment when it completes. If you call discard() there is no way you can get it back.

You add any asynchronous segment to the a pipeline in exactly the same manner you would add any other segment. It gets dispatched in the normal way, with the normal arguments supplied to the dispatch method. Getting objects from the store will retrieve them as expected. however altering those objects or setting them back into the store will not do what you expect.

Pipeline::Segment::Async works by indicating to the dispatcher that it wants a different method to be its dispatch method. If you indicate to the dispatcher that you want something to dispatch different at the segment level, then your asynchronous segment will be come decidedly synchronous.

Pipeline::Segment::Async inherits from Pipeline::Base and has any methods that it provides.

determine_threading_model() will look at all the classes in the list provided by threading_models() and determine if they can operate under the current configuration. It will return an object of one of those classes, provided it can operate.