register

open fun register(slot: Int, h: Handler)

Register the handler for a patch slot.

Copy-on-write even when the array already fits: a plain store into the live array gives a reader no happens-before, and only the volatile publish below does. Installs are rare, so copying is cheaper than having to reason about when a fire would see the store.

Parameters

slot

the index minted for this install, inlined into the woven advice as a constant

h

the game-side handler to invoke when that slot fires