Concurrent, backpressured execution for independent PDF render jobs.
Phoenix applications should place a Task.Supervisor in their supervision
tree and pass its name to stream/4 or through the :supervisor option of
run/3.
Summary
Functions
Cancels a task, allowing a graceful shutdown before forcing termination.
Executes all jobs and returns their isolated results.
Starts one supervised job and returns its task handle.
Returns a lazy, backpressured stream of render results.
Types
@type option() :: {:supervisor, Supervisor.supervisor()} | {:max_concurrency, pos_integer()} | {:timeout, timeout()} | {:ordered, boolean()} | {:job_id, (term(), non_neg_integer() -> term())} | {:on_result, (PaperForge.Concurrent.Result.t() -> term())} | {:max_attempts, pos_integer()} | {:retry_delay, non_neg_integer()} | {:retry_on, [PaperForge.Concurrent.Result.status()]} | {:max_memory_bytes, pos_integer() | :infinity} | {:max_reductions, pos_integer() | :infinity}
Functions
Cancels a task, allowing a graceful shutdown before forcing termination.
@spec run(Enumerable.t(), (term() -> term()), [option()]) :: [ PaperForge.Concurrent.Result.t() ]
Executes all jobs and returns their isolated results.
When no supervisor is supplied, PaperForge starts and stops a private
Task.Supervisor for the duration of the call.
Starts one supervised job and returns its task handle.
@spec stream(Supervisor.supervisor(), Enumerable.t(), (term() -> term()), [option()]) :: Enumerable.t()
Returns a lazy, backpressured stream of render results.
The supplied supervisor should normally be owned by the calling application's supervision tree.