Skip to content

OnParked

OnParked = (piece) => void | Promise<void>

Defined in: packages/synapse-core/src/sp/create-piece-batcher.ts:68

Called after the piece is on this SP, before it joins the addPieces window. The callback is awaited, so a thrown error keeps the piece out of the batch (retry with PieceBatcher.enqueue). PieceBatcher.close waits for it the same way it waits for park/pull I/O.

ParameterType
pieceEnqueuePiece

void | Promise<void>