On development the Private blocks' takes run on a worker per context, and
their release waits until no worker holds the ledger (ce64175ac). The pool's
zeroer met both rules badly:
- a take worker whose carve covered the chunk the zeroer was zeroing waited
for that chunk, so a take waited on the zeroer;
- the release waited for the pool's take workers and its zeroer to leave
their loops, but not for their threads to let go of the pool. The pool's
clock holds the platform, so a thread whose handle was the last could drop
rt's device past the release, the bug ce64175ac fixed for the ledger.
The zeroer now zeroes each chunk, 16 KiB, with the pool's lock held, and lets
the lock go between chunks. A carve is made under the same lock, so it never
meets a chunk half zeroed: no claim and no wait on either side. A holder of
the lock waits at most one chunk's zeroing, as for any other holder. The
zeroer shares no ledger, lock or thread with the Private blocks' workers.
The Private blocks' thread count (Threads, Live) moves to the pool's module.
The pool's take workers and zeroer are counted in it from their spawn until
they let go of the pool, and the release waits for that count. A new test
pins it: after the release, the pool's only handle is the caller's.