2
Issues:
•Intrusive in API: Burying the async work partly inside the APIs changes/bloats the APIs and can duplicate code.
•Complex for callers: Instead of calling one function, the user must call two functions, manage intermediate state, and write an additional function of his own for the callback.
•Hand-coded pattern, no language support/checking: The pattern may vary; consistency depends on manual discipline. This approach has more potential points of failure where the programmer can go wrong.
–DG example: “Do ensure that the EndMethodName method is always called even if the operation is known to have already completed. This allows exceptions to be received and any resources used in the async operation to be freed.”
Comparison: FX Async Pattern (2)