Open pablocastillaquintas opened 4 years ago
Hi!
In order to return data in a stream and being more memory friendly it would be fantastic if the AF could support IAsyncEnumerable return. Example:
[FunctionName("Function1")] public static async IAsyncEnumerable Run( [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req, ILogger log) { log.LogInformation("C# HTTP trigger function processed a request."); for (var i = 0; i < 10; i++) { yield return i; } }
Thanks
Related to https://github.com/Azure/azure-functions-dotnet-worker/issues/773
Hi!
In order to return data in a stream and being more memory friendly it would be fantastic if the AF could support IAsyncEnumerable return. Example:
[FunctionName("Function1")] public static async IAsyncEnumerable Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
log.LogInformation("C# HTTP trigger function processed a request.");
for (var i = 0; i < 10; i++)
{
yield return i;
}
}
Thanks