Add even more documentation

This commit is contained in:
Christopher Baines 2026-03-18 08:58:41 +00:00
parent d3d4964210
commit 09cb805ee2
5 changed files with 85 additions and 0 deletions

View file

@ -54,6 +54,15 @@
rest)))))
(define* (fibers-sort! items less #:key parallelism)
"Sort ITEMS destructively using LESS as the comparison procedure,
using a parallel merge sort. Returns the sorted list.
Splits ITEMS into chunks, sorts each in an eager fiber-promise in
parallel, then merges pairs of sorted chunks in parallel until one
sorted list remains.
@code{#:parallelism} sets the number of initial chunks. Defaults to
the current fibers parallelism."
(define requested-chunk-count
(or parallelism
(+ 1 (length (scheduler-remote-peers (current-scheduler))))))