Skip to content

Reduce LSL inlet pull latency - #39

Merged
cboulay merged 1 commit into
devfrom
cboulay/low_latency_pull
Jul 28, 2026
Merged

Reduce LSL inlet pull latency#39
cboulay merged 1 commit into
devfrom
cboulay/low_latency_pull

Conversation

@cboulay

@cboulay cboulay commented Jul 23, 2026

Copy link
Copy Markdown
Member

Summary

  • require pylsl 1.18.4b1 and use pull_chunk(..., min_samples=1) to wait for the first sample, then drain immediately available data
  • increase the default pull timeout from 5 ms to 100 ms without adding batching latency
  • snapshot strong references and scalar pull settings before entering the worker thread
  • discard stale results when shutdown or reconfiguration replaces an inlet during an in-flight pull
  • update inlet settings documentation and cover all pull paths plus concurrent teardown

The snapshot retains references to the existing inlet, fetch buffer, clock synchronizer, and message template; it does not copy the fetch buffer.

Testing

  • uv run pytest -q — 26 passed
  • uv run ruff check src/ezmsg/lsl/inlet.py tests/test_inlet.py
  • pre-commit Ruff and formatting hooks passed

@cboulay
cboulay merged commit 6c1934c into dev Jul 28, 2026
2 checks passed
@cboulay
cboulay deleted the cboulay/low_latency_pull branch July 28, 2026 00:12
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