Skip to content

There is no way to detect that a given stream has finished. #68

Description

@IoanStoianov
[FunctionName("Generator")]
public static async IAsyncEnumerable<dynamic> Generator([PerperTrigger] dynamic parameters, ILogger logger)
{
    for (var i = 0; i <= parameters.Count; i++)
    {
        yield return new { Num = i };
    }
}
var generator = await context.StreamFunctionAsync<dynamic>("Generator", new { Count = count });

await foreach(var element in generator){
    ...
}

The foreach will iterate through the numbers from 0 to 10 and it will freeze

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions