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

Enable async I/O handles to support cancellation tokens #215

Merged
merged 1 commit into from
Jul 18, 2021
Merged

Enable async I/O handles to support cancellation tokens #215

merged 1 commit into from
Jul 18, 2021

Conversation

ionothanus
Copy link

Resolves #188 by opening handles in asynchronous (overlapped) mode.

@MelbourneDeveloper
Copy link
Owner

Woo! I never thought I'd see the day when someone actually fixes something like this. Thanks. I'll take a look soon.

@MelbourneDeveloper
Copy link
Owner

@ionothanus this certainly looks like you're on the right path. However, I've tried something similar before and it failed inexplicably. Have you tested this with a device?

If not, I will give it a go when I have time.

@ionothanus
Copy link
Author

I’ve been using it successfully with a mechanical keyboard. Certainly wouldn’t hurt to have someone else try it, though. I’m
not sure if there have been any changes to .NET that have enabled this to work successfully where it didn’t before.

@MelbourneDeveloper MelbourneDeveloper merged commit f5647a8 into MelbourneDeveloper:develop Jul 18, 2021
@MelbourneDeveloper
Copy link
Owner

@ionothanus I thank you very much. I tested it on two HID devices and it works. I haven't proved that cancellation tokens work yet, but I'm going to close the issue until someone reports otherwise.

Were you able to test cancellation tokens?

@MelbourneDeveloper
Copy link
Owner

@ionothanus this is now part of the 4.1.0 version

@ionothanus
Copy link
Author

Fantastic! Yes, I went down this path because my use case needed cancellation tokens, and I can confirm this enabled them to work for me.

MelbourneDeveloper added a commit that referenced this pull request Oct 29, 2021
…ework

Added flag to disable changes from #215 for .Net Framework

@andyvorld thanks
cupsos added a commit to cupsos/Device.Net that referenced this pull request Nov 10, 2021
cupsos added a commit to cupsos/Device.Net that referenced this pull request Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants