> You mean it needs 15 lines whete C# needs one? ;)
Can you elaborate? The async/await approach is much more than 1 line when you need to switch a call between them. Whereas the green thread approach does not need anything.
Can you elaborate? The async/await approach is much more than 1 line when you need to switch a call between them. Whereas the green thread approach does not need anything.
x = await someFunction()
await waitForSomeOtherFunction()
(both are async)var x = someFunction() waitForSomeOtherFunction()
That's semantically equivalent in the two languages.