Skip to content

Common API: Events / callbacks #8

Open

Description

@campagnola

How should we handle event-driven behaviors in the common API? In acq4, I used Qt's signal/slots for this, but I don't think that would be a good choice for this project. In vispy, we created a simple event/callback system (https://github.com/vispy/vispy/blob/master/vispy/util/event.py). There are also other (more common) event frameworks that we could draw from.

Activity

  1. nvladimus commented on Mar 13, 2020

    @nvladimus
    Contributor

    Why is signal/slot not a good choice?

  2. campagnola commented on Mar 13, 2020

    @campagnola
    ContributorAuthor

    Embedded in an application that already uses Qt, signal/slot is a great choice. But if we're going for a library that can be shared by many different projects, then we should probably not have Qt as a low-level dependency. My current feeling is that basic callbacks should be sufficient at the level of the individual device classes, and that we could also have an add-on event driven layer that makes use of Qt or similar.

  3. nvladimus commented on Mar 13, 2020

    @nvladimus
    Contributor

    OK, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions