Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caput with callback #98

Merged
merged 9 commits into from
Jul 29, 2022
Merged

Caput with callback #98

merged 9 commits into from
Jul 29, 2022

Commits on Jul 28, 2022

  1. Configuration menu
    Copy the full SHA
    d9ca6e4 View commit details
    Browse the repository at this point in the history
  2. Implement asynchronous record processing

    Includes a "blocking" flag on record creation.
    
    This change allows you to use caput in asynchronous mode, where it will
    wait for record processing to complete.
    AlexanderWells-diamond committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    0a49421 View commit details
    Browse the repository at this point in the history
  3. Avoid multiple dispatcher() calls for non-async

    This implementation still leaks abstractions - the device now needs to
    know about the difference between cothread and async calls.
    Perhaps another round of refactoring is required...
    AlexanderWells-diamond committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    ae2b6e4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    799f4c0 View commit details
    Browse the repository at this point in the history
  5. Refactor the check for async on_update calls

    Also add single and multi threaded tests for blocking records.
    AlexanderWells-diamond committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    bb322f0 View commit details
    Browse the repository at this point in the history
  6. Add documentation of blocking and SetBlocking

    Renamed the function to conform to naming convention.
    Added CHANGELOG entry.
    AlexanderWells-diamond committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    0591f51 View commit details
    Browse the repository at this point in the history
  7. Fix bug with async on_update_name callbacks

    This leaks even more async code into the device, but I can't see a way
    around it without having to require the dispatcher be provided before
    creating records...
    AlexanderWells-diamond committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    5791af4 View commit details
    Browse the repository at this point in the history
  8. Refactor dispatchers to remove implementation leak

    By creating/modifying the dispatchers we can easily handle the
    __completion being called after the __on_update.
    Without doing this there seem to be unavoidable implementation leaks,
    where the device.py file would have to care about the difference
    between cothread and asyncio.
    AlexanderWells-diamond committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    fdeca46 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2022

  1. Code review changes from Michael. Includes:

    - SetBlocking returns the old blocking state value. Added test.
    - Fix some style issues
    - Make completion function on the dispatcher optional, to maintain some
    compatibility with the previous API
    AlexanderWells-diamond committed Jul 29, 2022
    Configuration menu
    Copy the full SHA
    877a89c View commit details
    Browse the repository at this point in the history