-
Notifications
You must be signed in to change notification settings - Fork 3
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
Async operations #19
Comments
Something that's not entirely clear from your readme is whether the NI_VISA library is required, or will libvisa work as well? I ask this because when trying to use
Appreciate you're feedback on this. |
Hi, in principle any visa library should work if it follows the specifications. EDIT: NI-visa use the visa version 5.8 while libvisa using 5.1, there should be no version problem since NI VISA works fine. BTW, do all methods fail or just this one? |
I have only tried Interestingly those functions do exist in the |
This crate wraps two async operations, async_read and async_write, they rely on Callback added to EventIoCompletion event that VISA is listening to.
There are several aspects that need to be aware of and should be improved:
The Future contains the ref of the buf passed to these two async functions, so they are not Sync and Send.The cause of the first problem is not clear, it might be related with running multiple VISA program synchronously, use
cargo t --jobs 1
can usually pass all tests, without it, a function of the tests will not quit sometimes. Another is associated with the Waker mechanism of Rust future system.They might be solved by adding another Waker that wakes the futures after some time no matter what.
I'm not familiar with low level async programing design and not sure if there are better solutions, any help would be grateful.
The text was updated successfully, but these errors were encountered: