-
Notifications
You must be signed in to change notification settings - Fork 112
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
problem with async routines? (example in documentation fails!) #500
Comments
(i also confirmed that the same is true directly in the python interpreter, aka it's not a "notebook" problem...) |
Hi Gary, Several remarks: you should use scope.single_async if you want to launch the curve acquisition in an asynchronous manner. And scope.single if you want the execution to be blocked until the result arrives. You should use purple async_utils.sleep instead of time.sleep (which never gives hand to the event loop) if you want to manage the waiting yourself, but I believe there's a function wait() to wait for the future to be ready in async_utils. Let me know if that helps |
Hi all,
I must admit that although I've been using the RP for 4 years now, I've never figured out how to get the acquisition routines working properly (and have been using instead the hidden low-level
_start_acquisition
and_get_curve
...). But I'd like to try to figure this out, since the others are giving me some strange results.What puzzles me is that
result()
for me never worked. But I've now figured it out:result()
only works if it is not executed in the same cell ascurve_async()
!This works fine:
But if I just merge the cells, it fails:
with error
Result not set
.Does anyone have any insight into this?
Thanks!
Gary
The text was updated successfully, but these errors were encountered: