5 ms·
Well that's just the "simple primitive for 'block the current thread on this async call'", which can, with the new `Wake` trait, be written in around 10 lines o
by ibraheemdev 5y ago
Well that's just the "simple primitive for 'block the current thread on this async call'", which can, with the new `Wake` trait, be written in around 10 lines of code. The real change would be adding an actual runtime to the standard library.
- steveklabnik 5y agoPotato, potato. Both involve adding some form of runtime, now we’re just negotiating details. (I personally would like a very very simple one like the ten LOC version, but wouldn’t want anything more.)
- ibraheemdev 5y agoWell the block_on runtime is only meant for testing or bridging sync and async code, so it wouldn't solve the problem :)
- steveklabnik 5y agoIt solves my problem, which is why I like it as a solution (documentation, examples, and tests), haha!