Skip to content

Metadata handling for not-yet-connected signals #617

@ZLLentz

Description

@ZLLentz

Expected Behavior

In all cases, the signal metadata should be communicated to the consumers of the signals prior to sending the values. This ensures the widget can prepare proper context for the data coming in.

Current Behavior

In cases where the signal is connecting for the first time after listeners have already been added, it's possible for the value callback to fire prior to the metadata callback.

Possible Solution

Add some sort of blocking/deferring mechanism, holding back all value callbacks until the first valid metadata callback is received.

Steps to Reproduce (for bugs)

  1. Create an EpicsSignal with enum strings
  2. Use it right away in a PyDMComboboxWidget prior to it being fully connected

This may be a race condition and may not happen every time.

Context

Discovered while testing #616

Your Environment

typhos branch from the linked PR with the following critical package versions from pydm (plus my ophyd version):

  • python 3.9.18
  • numpy 1.24.4
  • PyQt 5.15.9
  • Qt 5.15.8
  • PyQtGraph 0.13.3
  • ophyd 1.7.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions