Skip to content

feat: add bulk insert methods to ListSignal and SharedListSignal#24026

Open
Artur- wants to merge 8 commits intomainfrom
feature/listsignal-insertall
Open

feat: add bulk insert methods to ListSignal and SharedListSignal#24026
Artur- wants to merge 8 commits intomainfrom
feature/listsignal-insertall

Conversation

@Artur-
Copy link
Member

@Artur- Artur- commented Mar 26, 2026

Add insertAllLast, insertAllFirst, and insertAllAt to ListSignal that perform the entire batch with a single notification. Add insertAllLast, insertAllFirst and insertAllAt to SharedListSignal using transactions for atomicity.

Artur- added 8 commits March 26, 2026 14:57
Add insertAllLast, insertAllFirst, and insertAllAt to ListSignal that
perform the entire batch with a single notification. Add insertAllLast
and insertAllFirst to SharedListSignal using transactions for atomicity.
…bulk insert methods

Extract createSignals() and insertAllAtInternal() private helpers so that
insertAllLast, insertAllFirst, and insertAllAt all delegate to a single
code path for signal creation and list construction.
Adds insertAllAt(Collection, ListPosition) to SharedListSignal, matching
the API symmetry with ListSignal which already has insertAllAt.
Delegate insertAllFirst and insertAllLast to insertAllAt instead of
duplicating the transaction and iteration logic. This removes the
reverse-iterate-then-reverse-ops approach in insertAllFirst.
…ture

insertAllFirst now delegates to insertAllAt(0, values), reducing the
boilerplate while insertAllLast keeps its own lock block to safely
compute the current size inside the lock.
The collection parameter must not be null, but individual null values
within the collection are allowed when the element type permits null,
consistent with the single-insert methods.
…actions

Nested transaction support is tested by calling insertAllLast and
insertAllFirst from within a Signal.runInTransaction block.
Covers the missing test gap where insertAllFirst with an empty
collection was not verified to be a no-op.
@Artur- Artur- requested a review from Legioth March 26, 2026 15:14
@sonarqubecloud
Copy link

@github-actions
Copy link

github-actions bot commented Mar 26, 2026

Test Results

 1 386 files  ± 0   1 386 suites  ±0   1h 26m 24s ⏱️ - 3m 9s
 9 942 tests +15   9 871 ✅ +15  71 💤 ±0  0 ❌ ±0 
10 415 runs  +15  10 335 ✅ +15  80 💤 ±0  0 ❌ ±0 

Results for commit a001e9a. ± Comparison against base commit 6213adb.

♻️ This comment has been updated with latest results.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant