-
Notifications
You must be signed in to change notification settings - Fork 25
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
Implement support for bluesky suspenders #508
Comments
Need to add support for the |
This means adding the ophyd-async/src/ophyd_async/core/_signal.py Lines 215 to 221 in 406ac08
and if it is False then after ophyd-async/src/ophyd_async/core/_signal.py Line 158 in 406ac08
set of listeners that want to drop the next notification
In ophyd-async/src/ophyd_async/core/_signal.py Line 151 in 406ac08
function is in the set of listeners that want to drop the next notification, then remove from the set and return without notifying, otherwise do the current behaviour
|
Working on a branch with those changes + added in a test to confirm when the callback gets called.
|
Caching makes sense.
Hmm, I only looked at https://github.com/bluesky/bluesky/blob/f46502482e3afcda57e4d6b3ae6bcc0eda129d42/src/bluesky/bundlers.py#L421-L422 which didn't do anything with the value, just went and called
I think I prefer 1 or 3. @tacaswell thoughts? |
@danielballan prefers 1 so we go with that |
Struggling to get a test to work here, it seems like copying this test https://github.com/bluesky/bluesky/blob/b6828c53a68252caeefc3712ea50c49e507d8db2/src/bluesky/tests/test_suspenders.py#L37 and replacing the
and starting those tasks before calling
that the RE finishes its scan before control returns to the asyncio tasks. I've tried in a few different ways but maybe there's a much more obvious way to test this. The suspender's resume/suspend methods do get called at least but I haven't been able to prove it interrupts as intended. I have also seen that when trying to set a signal to a value that should suspend while inside a plan using |
Are you using the RE event loop to start the tasks? E.g. |
I've tried both, call_in_bluesky_event_loop is probably what we want, but that has the issue I described above where the |
There is currently no support for bluesky suspenders. SignalR.subscribe() may need a refactor to comply with the expected structure.
The text was updated successfully, but these errors were encountered: