You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be really great if SearchAsync took a cancellation token. When using this library inside of a Windows Service, you get an annoying behavior where when you try and stop the Windows service, if your code is inside the SearchAsync function, it blocks the whole app from closing until it comes out. When in the Windows Service manager, the "Stopping Service" dialog is popped up until SearchAsync finishes. This is due to, I think, the line in SearchAsync where its doing this:
await TaskEx.Delay(searchWaitTime).ConfigureAwait(false);
All you would do is add a cancellation token to the SearchAsync functions, and pass that along into the TaskEx.Delay() and that should fix it. What do you think?
The text was updated successfully, but these errors were encountered:
This seems like a good idea. I'd be happy to look at a PR, otherwise I'll have a look at this next time I'm in the code, but not sure when that will be, sorry.
It would be really great if SearchAsync took a cancellation token. When using this library inside of a Windows Service, you get an annoying behavior where when you try and stop the Windows service, if your code is inside the SearchAsync function, it blocks the whole app from closing until it comes out. When in the Windows Service manager, the "Stopping Service" dialog is popped up until SearchAsync finishes. This is due to, I think, the line in SearchAsync where its doing this:
await TaskEx.Delay(searchWaitTime).ConfigureAwait(false);
All you would do is add a cancellation token to the SearchAsync functions, and pass that along into the TaskEx.Delay() and that should fix it. What do you think?
The text was updated successfully, but these errors were encountered: