Hack to serialize future<T>, which is a destructive operation