You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix listview task channel handling when task is replaced
When Upsert is called with a new TaskDetails for an existing task
(e.g., due to retry logic), the old channel was orphaned. The caller
blocked on waitForResultOrTimeout would never receive a response.
Changes:
- Modified Upsert to return (TaskDetails, bool) so caller can detect
when a task was replaced and send an error to the old channel
- AddTask now sends error to old channel when replacing a task to
unblock waiters
- Added thread-safe locking to Count() method
- Added comprehensive unit tests for TaskMap and listview functions
The race condition between processTaskUpdate and reportErrorOnAllPendingTasks
is handled correctly by existing non-blocking sends with buffer size 1.
0 commit comments