Ivan FB 0b8b037adf
fix: async Cleanup for recycle ABI + guard rmRegistry
sds_destroy is now non-blocking and recycles the context, delivering the
drain outcome via the callback. Cleanup blocks on that callback through
sdsCall, which also backpressures NewReliabilityManager against recycle so
the fixed context pool cannot be exhausted under create/destroy churn.

Guard rmRegistry with a RWMutex: it is written by register/unregister
(Create/Cleanup) and read by sdsGlobalEventCallback on the nim-ffi event
thread, which otherwise triggered a fatal "concurrent map read and map
write" once multiple managers ran concurrently.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 10:05:18 +02:00
..
2025-12-22 16:45:14 +00:00