Not (yet) a Nim user, but another post mentioned that GC is thread-specific, so you can remove all traces of GC-types from your real-time thread(s) in order to avoid deallocations at the wrong times.
A related question is whether you can disable GC on a thread by thread basis.
A related question is whether you can disable GC on a thread by thread basis.