pool_lapply: Parallel Dispatch with Async Workers

View source: R/dispatch.R

pool_lapplyR Documentation

Parallel Dispatch with Async Workers

Description

An alternative dispatch that uses parallel::parLapply-style execution but with supervision. This is a simpler interface for basic parallel apply.

Usage

pool_lapply(X, FUN, ..., pool = NULL, chunk_size = 1L)

Arguments

X

List or vector to iterate over.

FUN

Function to apply to each element.

...

Additional arguments to FUN.

pool

A shard_pool object. If NULL, uses current pool.

chunk_size

Integer. Elements per chunk (default 1).

Value

A list of results.

Examples


pool_create(2)
result <- pool_lapply(1:4, function(x) x^2, pool = pool_get())
pool_stop()


shard documentation built on April 3, 2026, 9:08 a.m.