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
Is it currently possible to cancel a pending async method? What happens if Twitch is down: will the sync/async methods run forever or cancel/timeout after a specific time?
Please consider adding a CancellationToken as parameter for async methods. Additionally, consider the possibility to specify a number of milliseconds to wait before requests time out.
@niklr Thanks for this, we are still working on the system and after some big changes we have made recently we are looking to implement things like this.
At the moment you are correct in asking but the async task will "timeout" if twitch is down, you'll almost instantly get an exception
Yes CancellationToken Support is sth we should/want to implement in the near future for sure.
For your other concern: The calls to the TwitchApi are based on Http calls so if a server is down that http call will come back with a http error Code and will be handled accordingly that in the end leads to an excepion being raised.
Working on trying some stuff out with the LiveStreamMonitor, I noticed that this might be a very helpful feature to cancel requests when the list of channels has been changed!
From @niklr on April 12, 2018 10:1
Is it currently possible to cancel a pending async method? What happens if Twitch is down: will the sync/async methods run forever or cancel/timeout after a specific time?
Please consider adding a CancellationToken as parameter for async methods. Additionally, consider the possibility to specify a number of milliseconds to wait before requests time out.
Copied from original issue: TwitchLib/TwitchLib#389
The text was updated successfully, but these errors were encountered: