thread: use a wrapper `proc` as the ICE workaround

This allows exposing the desired interface externally, at the cost of
requiring a redundant heap closure as a wrapper.