Enable async I/O handles to support cancellation tokens by ionothanus · Pull Request #215 · MelbourneDeveloper/Device.Net
Resolves #188 by opening handles in asynchronous (overlapped) mode.
Woo! I never thought I'd see the day when someone actually fixes something like this. Thanks. I'll take a look soon.
@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.
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.
@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?
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.
This was referenced
Oct 19, 2021This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters