3 ms·
yield; Will block execution until the generator is resumed and return control flow to the caller. I haven't actually tried it, but it should be pretty straight
by pmjordan 15y ago
yield;
Will block execution until the generator is resumed and return control flow to the caller. I haven't actually tried it, but it should be pretty straightforward to wrap a generator function in such a way that it's driven (resumed) by callbacks from async I/O calls.