github.com/fluhus/gostuff@v0.4.1-0.20240331134726-be71864f2b5d/ppln/v2/doc.go (about)

     1  // Package ppln provides generic parallel processing pipelines.
     2  //
     3  // # General usage
     4  //
     5  // This package provides two modes of operation: serial and non-serial.
     6  // In [Serial] the outputs are ordered in the same order of the inputs.
     7  // In [NonSerial] the order of outputs is arbitrary,
     8  // but correlated with the order of inputs.
     9  //
    10  // Each of the functions blocks the calling function until either the processing
    11  // is done (output was called on the last value) or until an error is returned.
    12  //
    13  // # Stopping
    14  //
    15  // Each user-function (input, transform, output) may return an error.
    16  // Returning a non-nil error stops the pipeline prematurely, and that
    17  // error is returned to the caller.
    18  //
    19  // # Experimental
    20  //
    21  // This package relies on the experimental [iter] package.
    22  // In order to use it, go 1.22 is required with GOEXPERIMENT=rangefunc.
    23  package ppln