Last I heard there was a plan to make asyncdispatch provide low-level unsafe methods that accept raw pointers, while higher-level modules (like asyncnet) would provide methods that work with GC-safe stuff.
In your case it seems the problem is that you pass pointer to GC data to an async proc without letting the GC know that you did that. So as soon as the current stack is left, the data is garbage collected. You should either call GC_ref at the beginning and GC_unref at the end of send or use alloc/copyMem/dealloc. Although in the second sample data should be captured in the callback's environment so that should not be a problem anymore.
