batch_with_interrupt: Execute batch operation with interrupt handling and progress

View source: R/interrupt.R

batch_with_interruptR Documentation

Execute batch operation with interrupt handling and progress

Description

Processes a list of items with progress tracking and graceful interrupt handling. If interrupted, reports how many items were completed before stopping.

Usage

batch_with_interrupt(items, fun, label_fun = NULL)

Arguments

items

List or vector of items to process.

fun

Function to apply to each item. Receives (item, index).

label_fun

Optional function to generate label for each item.

Value

List of results (NULL for items not processed due to interrupt).


Rclade documentation built on Sept. 26, 2026, 5:07 p.m.