apple / apple/swift-async-algorithms

Provide an option for chunking based on a signal to include empty chunks

Open
#247 1 comment 1 reaction 0 assignees View on GitHub
enhancement good first issue
Dominant language
Swift
Stars
3.7k
Forks
226
Avg merge
10d 3h
Merged PRs (30d)
1

Description

For sequences that chunk based on a signal, the signal will be effectively ignored if no elements were received since the previous signal. Adding an option to pass an empty chunk on such a signal would be useful, particularly for use cases where you want to detect and report on the absence of something regularly happening.

An alternative approach would be to make this the default behaviour since there are other mechanisms that can be used to compose a sequence that only produces non-empty chunks.

Contributor guide

Open the contributing guide

Research direction

The issue is the entry point; locate the signal-based chunking API and its existing tests. First trace how a signal is handled when no elements arrive, then determine whether an option or default behavior is appropriate and verify empty chunks without changing non-empty cases. Done means coverage for consecutive signals and normal chunking behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.