The first Foo method is not in control of when the fetch returns, is not blocking during the fetch, but does not progress to next step until the system performs the await. I'm thinking it is IoC because the system does indeed resume control on to original stack in same way as a event would. I never think of this pattern as IoC rather I call it the async/await pattern.
For me, IoC is using Dependency Injection, Interfaces, and even functions, the idea being the caller is able to drive the behaviors.
……I don't know if you did get my idea…The "control" I'm talking about has nothing to do with thread/blocking/stack, but a mental interpretion of logic flows.
Yeah someday I will find out what's not so correct. I do have some similar experiences for several times, due to have different (levels of) perspectives to a problem.
Issues so far: poor English; ill-demostrated example;
The first Foo method is not in control of when the fetch returns, is not blocking during the fetch, but does not progress to next step until the system performs the await. I'm thinking it is IoC because the system does indeed resume control on to original stack in same way as a event would. I never think of this pattern as IoC rather I call it the async/await pattern.
For me, IoC is using Dependency Injection, Interfaces, and even functions, the idea being the caller is able to drive the behaviors.
……I don't know if you did get my idea…The "control" I'm talking about has nothing to do with thread/blocking/stack, but a mental interpretion of logic flows.
No I understand just don't think it's a good article on IoC, too many problems.
Yeah someday I will find out what's not so correct. I do have some similar experiences for several times, due to have different (levels of) perspectives to a problem.
Issues so far: poor English; ill-demostrated example;
But the good news is this post may be improved. The topic is good for sure.