Fiber.List
Concurrent list operations.
These functions behave like the ones in the standard library's List
module, except that multiple items can be processed concurrently.
They correspond to Lwt's Lwt_list.*_p
operations. e.g. Lwt_list.iter_p
becomes Fiber.List.iter
. For the Lwt_list.*_s
operations, just use the standard library function. e.g. Lwt_list.iter_s
can be replaced by a plain List.iter
.
filter f x
is like List.filter f x
except that the invocations of f
are run concurrently in separate fibers.
map f x
is like List.map f x
except that the invocations of f
are run concurrently in separate fibers.
filter_map f x
is like List.filter_map f x
except that the invocations of f
are run concurrently in separate fibers.