Skip to content

fix(dispatcher): add dispatcher relay - #1289

Draft
wakonig wants to merge 1 commit into
mainfrom
fix/dispatcher_relay
Draft

wakonig wants to merge 1 commit into
mainfrom
fix/dispatcher_relay

Conversation

@wakonig

@wakonig wakonig commented Sep 9, 2026

Copy link
Copy Markdown
Member

Description

Deliver weak dispatcher callbacks through Qt receiver contexts. Cancel queued data immediately and defer native relay deletion until in-flight emitters release it. Preserve receiver migration and modal RPC delivery. Waveform reads subscription context from metadata; log ingestion no longer requires a Qt sender.

Related Issues

None linked.

Type of Change

  • Bug fix with a dispatcher callback contract change.

How to test

QT_QPA_PLATFORM=offscreen python -m pytest -p no:xvfb -p no:cacheprovider --random-order -q tests/unit_tests/test_{bec_dispatcher,bec_widget_lifecycle,bec_connector,rpc_server,waveform,logpanel,image_view_next_gen}.py

320 tests passed, including 5,000 producer/cancellation iterations and 10,000 GC/invalidation iterations in subprocess regressions. These check cancellation, eventual relay release, and absence of native crashes.

Potential side effects

Plugins using dispatcher callbacks must replace sender().cb_info with metadata["cb_info"] and remove verify_sender=True.

Screenshots / GIFs (if applicable)

N/A — no layout changes.

Additional Comments

CLI/Designer regeneration produced no diff. Follow-up fixes remain local, uncommitted and unpushed.

Definition of Done

  • Documentation is up-to-date (callback contract and waveform docstrings).

@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.87500% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
bec_widgets/utils/bec_dispatcher.py 96.87% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Benchmark comparison

Threshold: 20% (lower is better).
Result: 0 regression(s), 0 improvement(s) beyond threshold.

No benchmark regression exceeded the configured threshold.

No benchmark improvement exceeded the configured threshold.

All benchmark results
Benchmark Baseline Current Change Status
BEC IPython client with companion app 1.99235 s 2.01771 s +1.27% ok
BEC IPython client without companion app 2.00405 s 2.00717 s +0.16% ok
Import bec_widgets 0.01367 s 0.0138719 s +1.48% ok
tests/unit_tests/benchmarks/test_dock_area_benchmark.py::test_add_waveform_to_dock_area 0.153213 s 0.157368 s +2.71% ok

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