3 ms·
There is a drawback: it pollutes the signatures of each asynchronous method and the signatures of the consumers. Each method now returns a Task, and each metho
by TravHatesMe 7y ago
There is a drawback: it pollutes the signatures of each asynchronous method and the signatures of the consumers.
Each method now returns a Task, and each method name ought to have a suffix of 'Async'. It sucks that changing this will require all consumers to also modify their signatures as well. But I understand why it is necessary, the compiler needs to mark each 'step' in the asynchronous function to create a kind of state machine.
- Rusky 7y agoBut it doesn't pollute the signatures of the consumers, that's the whole point of this subthread. If you don't want/need to expose your async-ness, you just synchronously block on your async callees instead of awaiting them.