-
Notifications
You must be signed in to change notification settings - Fork 34
async support? #13
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
Comments
Hi! I don't have any plans to implement that myself (it's quite complex to interact with WMI as it is, and this crate already solves my problem). Reading the WMI docs, it seems possible and I'll be happy to accept PRs if you think that's something you'd like to implement 😄 |
Hello @ohadravid I'd like to give it a try, this is what I'm thinking of (i'll put everything here, it's not necessary a must read, it's before creating a PR) General IdeaAdd support for ExecQueryAsync in WMIConnection. Design [WIP]The idea would be to add an pub fn exec_async_query_native_wrapper(
&self,
query: impl AsRef<str>,
) -> Result<QueryResultSink, WMIError> { }
pub fn async_raw_query<T>(&self, query: impl AsRef<str>) -> Future<Result<Vec<T>, WMIError>>
where
T: de::DeserializeOwned, {} I have to dig into https://docs.microsoft.com/en-us/windows/win32/wmisdk/iwbemobjectsink ImpactsI'll have to use https://docs.rs/winapi/0.3.9/winapi/um/wbemcli/struct.IWbemObjectSink.html Regards, |
Hi! The hardest thing IMO will be getting right the lifetimes/pin/unpin semantics of this code, so a crucial part of every change should be a link & quote of the relevant part of the documentation. Also implementating it in a few separate PRs will be easier to review. Good luck! |
Hello! First hurdle is to provide an implementation of I have to dig into how the com crates implements its I'll keep you updated of my progress, if I make any 😄 Regards, |
Closing now that #30 is merged and published 🎉 |
For a heim crate I'm looking for a way to fetch the temperature sensors data for Windows and it seems that WMI and
MSAcpi_ThermalZoneTemperature
class is the only reasonable solution to do that.Since
heim
is an async lib, I would prefer the async interface to WMI, but it seems thatwmi
crate does not has it at the moment. Do you planning to add it, maybe?The text was updated successfully, but these errors were encountered: