var assert = require('assert')
var cadence = require('cadence')

function Pipeline (pipeline) {
    var nextProcessor = {
        process: function () {}
    }
    this.processors = pipeline.slice().reverse().map(function (processor) {
        var Processor = require(processor.module)
        assert(Processor.isProlificProcessor, 'not a processor')
        return nextProcessor = new Processor(processor, nextProcessor)
    }).reverse()
    this._opened = []
}

Pipeline.prototype.open = cadence(function (async) {
    async.forEach(function (processor) {
        async(function () {
            processor.open(async())
        }, function () {
            this._opened.push(processor)
        })
    })(this.processors)
})

Pipeline.prototype.close = cadence(function (async) {
    async.forEach(function (processor) {
        processor.close(async())
    })(this._opened)
})

module.exports = Pipeline

@@ -98,19 +98,19 @@
    var n
-ext
+ull
 Processo
@@ -115,16 +115,66 @@
 sor = %7B%0A
+        open: function (callback) %7B callback() %7D,%0A
         
@@ -196,22 +196,111 @@
 on () %7B%7D
+,
 %0A    
-%7D
+    close: function (callback) %7B callback() %7D%0A    %7D%0A    var nextProcessor = nullProcessor
 %0A    thi
@@ -560,16 +560,79 @@
 )%0A    %7D)
+%0A    this.processors.unshift(nullProcessor)%0A    this.processors
 .reverse

Add null processor to pipeline.