Using newForeignPtr from Foreign.Concurrent.