2 ms·
The main trick on display here is that you can store a reference to the `resolve` method of a promise that normally would have to be called within the promise d
by pcattori 4y ago
The main trick on display here is that you can store a reference to the `resolve` method of a promise that normally would have to be called within the promise definition itself.
Of course, you don't need a channel abstraction to do that. To me, channels are the most intuitive and self-contained way to solve the problem, so I wanted to use that model of concurrency in JS.