7.10. Carrying Extra State with Callback Functions
def apply_async(func, args, *, callback): # Compute the result result = func(*args) # Invoke the callback with the result callback(result)
def apply_async(func, args, *, callback): # Compute the result result = func(*args) # Invoke the callback with the result callback(result)