3 ms·
Personally have found async rust to be both ugly and not very useful. Instead of async IO I just make my own event loop with mio and use non-blocking non-async
by smabie 4y ago
Personally have found async rust to be both ugly and not very useful. Instead of async IO I just make my own event loop with mio and use non-blocking non-async libraries (like tungstenite for WS and mio_httpc for HTTP).
- conradludgate 4y agoSounds like you're almost re-implementing single threaded async
- smabie 4y agoYeah I suppose I am, but the perf is better (very important in this particular use case) and the code is simpler (imo).
- avinassh 4y agoBut what makes the perf to be better? Better scheduling / less context switches?
- deleted 4y ago[deleted]
- conradludgate 4y agoI think using a simple single threaded executor gets you little context switching and such. The issue is that async generator codegen currently is not as good as we want it to be. Async futures currently take more space than they need to and have some issues with drop tracking. They're sound, but not necessarily efficient. These are not problems with the language or the feature, just the current implementation
- insanitybit 4y agoMaybe check out glommio.