chore(core): create a wrapper to manage async callbacks