This solution looks quite similar to the mechanism of "Promise" if you are familiar with JavaScript ES6. Actually, we can achieve all the above logic by making use of task-based asynchronous pattern ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results