Skip to content

Drain pending position updates at timepoint boundaries#263

Draft
ieivanov wants to merge 2 commits into256-position-update-infrastructurefrom
drain-position-updates
Draft

Drain pending position updates at timepoint boundaries#263
ieivanov wants to merge 2 commits into256-position-update-infrastructurefrom
drain-position-updates

Conversation

@ieivanov
Copy link
Copy Markdown
Collaborator

Summary

  • Add failing tests for unbounded executor queue growth
  • Drain pending position updates at timepoint boundaries

Test plan

  • Verify position updates are processed at timepoint boundaries
  • Confirm executor queue does not grow unbounded

🤖 Generated with Claude Code

Justin Eskesen added 2 commits April 4, 2026 14:44
Tests reproduce the MemoryError: Buffer overflowed crash by verifying
that event_iterator drains pending position updates at timepoint
boundaries. Without backpressure, a slow updater causes z-stack frame
data to accumulate in the ThreadPoolExecutor queue faster than it drains.
Prevents unbounded executor queue growth that caused MemoryError: Buffer
overflowed during long DynaTrack acquisitions. When the updater is slower
than the acquisition rate, z-stack frame data accumulated in the
ThreadPoolExecutor queue without bound. Now event_iterator detects
timepoint transitions and blocks until the pending update completes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant