- [Fix] Prevent
Producer#closefrom raisingThreadError: can't be called from trap contextwhen invoked from a Ruby signal trap context (e.g. Puma'safter_stoppedDSL hook in single mode).closenow detects this case and delegates to a background thread, joining it so the caller blocks until the producer is fully closed (#866).