4 ms·
C#/.NET has all of this already. You don't have to import anything else to use async/await.
by Xevi 6y ago
C#/.NET has all of this already. You don't have to import anything else to use async/await.
- dragonwriter 6y ago[deleted: man, was that a dumb comment]
- jayd16 6y agoNo I think you're mistaken. You can rewrite pretty much every part of the system. You can write your own synchronization, you can write your own scheduling, you can write custom awaiter implementations. Its very pluggable. You might be able to argue that its even more pluggable than Tokio because the system has the concept of current context and attaching a task to it. Library code can use your custom scheduler. You can even throw away the Task type and create your own future type that works with the async/await syntax but of course no library would be able to pick that up.
- tick_tock_tick 6y agoOf course it does just because C# comes with all the bells and whistles doesn't mean you can't write your own in it. https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.taskscheduler?view=net-5.0 https://docs.microsoft.com/en-us/dotnet/api/system.threading...