Skip to content
Commit Detail

Commit e945af7

Author
Kenton Varda <kenton@cloudflare.com> 2026-03-12 18:28:00 -0500
Parents
ff9ffff
Tree
38924cd
Add WORKER_LOADER.load() for one-off workers.

`LOADER.load(code)` is equivalent to `LOADER.get(null, () => code)`.

This change got annoying to the pesky detail that the system might call the callback multiple times, forcing me to create clone() methods for a bunch of structures so that I could build the structure ones and return a clone on every call. The source code itself is refcounted between these clones, at least.

Files changed