def apply_async(pool, fun, args, callback=None): return pool.apply_async( run_dill_encoded, (dill.dumps((fun, args)),), callback= callback)