# Method Concurrent.serialize()

Method serialize

  ``Future` serialize(`array`(`Future`) `futures`, `function`(`mixed`, `mixed` ... :`mixed`) `fun`, `mixed` ... `extra`)`

Description

  Return a Future that represents the array of mapping `fun` sequentially over the results of the completed `futures`.

  This function differs from traverse() in that only one call of `fun` will be active at a time. This is useful when each call of `fun` uses lots of resources, but may increase latency.

  If `fun()` fails for one of the items, it will not be called for any others.

Note

  The returned Future does NOT have any state (eg backend) propagated from the `futures`. This must be done by hand.

See also

  traverse()