.net - How Asynchronous method invocation pattern in c# works and implemented? -
I'm running many code loosely based. How is this generally implemented (preferably in production)?
- How does this work?
- How is it used?
- How is it implemented?
Pattern usually occurs as follows:
- You have a
start XXXmethod in which all andrefereecan be a representative along with arguments (can be empty) and a state object reference (can also be zero) ) And gives one. This method is applied to call, and it immediately returns more or less returns. - You then have a
andxaxmethod, which returnsIAsyncResultto complete the callStart XXXoperation Plus anyrefandoutsidearguments apply (either blocking after callback or blocking). Theandxaxmethod will return the result (if there is no invalid method) or throw an exception (if the method exits exception).
On the Stream class or any representative, they give you examples of those signatures. Besides, one is complete.
Comments
Post a Comment