Skip to content

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

@IoanStoianov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions