c# - Chained async methods - tie a thread POV? -


Assume I have this code:

  public zero AAA () {BBB ( ); } Public ASCNC Work BBB () {Waiting for the job. Daley (10000); }  

IMHO, in normal mode, the method should be AAA as well as async so that the main thread continues without doing its job without waiting. .

But I have 2 questions about this situation:

  1. Is it correct to say that the above code binds thread for 10 seconds? (I doubt that the answer is yes because AAA is not ASC, so there is no registration of continuity)

  2. If so, how can I prove it by code? Am I

Is it right to say that the above code is a thread Does Tie 10 seconds?

not

AAA call BBB , which sets a function and returns immediately because < Code> AAA no wait on BBB , it comes back immediately, so the "own" thread is not tied.

Tasks. "Implementation" of Dele / itself uses the timer instead of blocking the thread, so there is no thread. The pool thread is bound to the duration of the work.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -