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

Feature: cancellation tokens #359

Open
lostmsu opened this issue Jun 3, 2024 · 1 comment
Open

Feature: cancellation tokens #359

lostmsu opened this issue Jun 3, 2024 · 1 comment

Comments

@lostmsu
Copy link
Contributor

lostmsu commented Jun 3, 2024

What exactly happens when my FS implementation takes too long?

Right now I am doing async calls and explicitly call .Result, which blocks the current thread until result is completed.

But I am not passing any cancellation tokens to them, because I don't get any from Dokan, so the calls can essentially last forever.

What do you think is the best option, have Dokan generate cancellation tokens matching its own expectation of when the calls should complete, or just create my own and set the same timeout value as I pass to DOKAN_OPTIONS.TimeOut?

@LTRData
Copy link
Contributor

LTRData commented Jun 3, 2024

The best option is to create your own cancellation token with the same timeout as you pass to Dokan. That will avoid lots of unnecessary work by called methods when the request from Dokan has timed out anyway.

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

No branches or pull requests

2 participants